1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/glitchsoc_ynh.git synced 2024-09-03 19:15:59 +02:00

Merge pull request #19 from nemsia/patch-2

[enh] Switch to tagged release
This commit is contained in:
__cyp 2017-05-06 18:52:21 +02:00 committed by GitHub
commit e9741741cf
2 changed files with 16 additions and 4 deletions

View file

@ -85,13 +85,17 @@ sudo su -c "psql" postgres <<< \
ynh_psql_create_db_without_password "$app"
sudo systemctl restart postgresql
# Download all Ruby source
# Download all sources rbenv, ruby and mastodon
sudo su - $app <<CLONECOMMANDS
git clone https://github.com/rbenv/rbenv.git $final_path/.rbenv
git clone https://github.com/rbenv/ruby-build.git $final_path/.rbenv/plugins/ruby-build
git clone https://github.com/tootsuite/mastodon.git $final_path/live
CLONECOMMANDS
# Switch to tagged release
cd $final_path/live
sudo git checkout $(git tag | tail -n 1)
# Be king rewind (/var/cache/yunohost/from_file/scripts)
popd

View file

@ -37,12 +37,20 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
# Stop Mastodon Services
sudo systemctl stop mastodon-*.service
# Update Mastodon
sudo su - $app <<COMMANDS
# Download Mastodon
sudo su - $app <<PULLCOMMANDS
pushd ~/live
git fetch
git pull https://github.com/tootsuite/mastodon.git master
git checkout $(git tag | tail -n 1)
PULLCOMMANDS
# Switch branch to tagged release
cd $final_path/live
sudo git checkout $(git tag | tail -n 1)
# Apply Mastodon upgrade
sudo su - $app <<COMMANDS
pushd ~/live
bin/bundle install
yarn install --pure-lockfile
RAILS_ENV=production bundle exec rails assets:clean