Commit e7538ae7 authored by ikuradon's avatar ikuradon 🐈

Modify some update scripts

parent 96914854
......@@ -16,5 +16,6 @@ time bin/rails assets:precompile
find ./public/assets -name "*.js" -or -name "*.css" | xargs -t brotli -q 10
find ./public/packs -name "*.js" -or -name "*.css" -or -name "*.svg" -or -name "*.ttf" -or -name "*.eot" | xargs -t brotli -q 10
bin/rails comm:revwrite
bin/tootctl cache clear
sed -i '/http_proxy/s/^#//g' .env.production
#!/bin/bash
set -eu
source /etc/profile.d/nvm.sh
export RAILS_ENV=production
nvm use lts/dubnium
for cmds in bundle yarn;do if ! type ${cmds} 2>/dev/null 1>/dev/null;then echo "${cmds}: Not found";exit 1;fi;done
cd `dirname $0`
rsync -ah --delete --exclude=vendor --exclude=node_modules --include=tmp/cache --include=tmp/packs --exclude=tmp ~/code/ builder:~/commcx/
ssh builder ./commcx/build.sh
rsync -ah --delete --exclude=vendor --exclude=node_modules --include=tmp/cache --include=tmp/packs --exclude=tmp builder:~/commcx/ ~/code/
rsync -ah --delete --exclude=vendor --exclude=node_modules --exclude=tmp ~/code/ frontend:~/code/
ssh frontend ./code/update-frontend.sh
......@@ -6,5 +6,6 @@ export RAILS_ENV=production
bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --without development test --clean --retry=3 --jobs=5
yarn --pure-lockfile && yarn cache clean
bin/tootctl cache clear
passenger-config restart-app --rolling-restart /opt/mastodon/code
pkill -u `id -u` node
......@@ -50,10 +50,6 @@ fi
bin/rails db:migrate
for pidfile in `ls tmp/pids/sidekiq-*`;do bundle exec sidekiqctl stop $pidfile;done
pkill -u `id -u` node
current_revision=ASSETS_REV
previous_revision=public/ASSETS_REV
......@@ -68,5 +64,8 @@ else
echo "assets build skipped."
fi
bin/tootctl cache clear
for pidfile in `ls tmp/pids/sidekiq-*`;do bundle exec sidekiqctl stop $pidfile;done
rsync -ah --delete --exclude=vendor --exclude=node_modules --exclude=tmp ~/code/ frontend:~/code/
ssh frontend ./code/update-frontend.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment