mirror of
https://github.com/YunoHost-Apps/glitchsoc_ynh.git
synced 2024-09-03 19:15:59 +02:00
Merge branch 'upgrade-from-pre-release'
This commit is contained in:
commit
c687c56305
2 changed files with 23 additions and 6 deletions
|
@ -102,10 +102,9 @@ CLONECOMMANDS
|
||||||
|
|
||||||
# Switch branch to tagged release
|
# Switch branch to tagged release
|
||||||
cd $final_path/live
|
cd $final_path/live
|
||||||
version=$(curl -s https://api.github.com/repos/tootsuite/mastodon/releases/latest | grep tag_name | cut -d\" -f4)
|
|
||||||
sudo su - $app <<SWITCHCOMMANDS
|
sudo su - $app <<SWITCHCOMMANDS
|
||||||
pushd ~/live
|
pushd ~/live
|
||||||
git checkout $version
|
git checkout $(git tag -l | sort -V | tail -n 1)
|
||||||
SWITCHCOMMANDS
|
SWITCHCOMMANDS
|
||||||
|
|
||||||
# Be king rewind (/var/cache/yunohost/from_file/scripts)
|
# Be king rewind (/var/cache/yunohost/from_file/scripts)
|
||||||
|
|
|
@ -50,10 +50,9 @@ PULLCOMMANDS
|
||||||
|
|
||||||
# Switch branch to tagged release
|
# Switch branch to tagged release
|
||||||
cd $final_path/live
|
cd $final_path/live
|
||||||
version=$(curl -s https://api.github.com/repos/tootsuite/mastodon/releases/latest | grep tag_name | cut -d\" -f4)
|
|
||||||
sudo su - $app <<SWITCHCOMMANDS
|
sudo su - $app <<SWITCHCOMMANDS
|
||||||
pushd ~/live
|
pushd ~/live
|
||||||
git checkout $version
|
git checkout $(git tag -l | sort -V | tail -n 1)
|
||||||
SWITCHCOMMANDS
|
SWITCHCOMMANDS
|
||||||
|
|
||||||
# upgrade Node.js v4 to v6
|
# upgrade Node.js v4 to v6
|
||||||
|
@ -67,11 +66,30 @@ fi
|
||||||
# add additional package for upgrade
|
# add additional package for upgrade
|
||||||
ynh_package_install pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev postgresql-server-dev-9.4
|
ynh_package_install pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev postgresql-server-dev-9.4
|
||||||
|
|
||||||
|
# Install ruby 2.4.2 for release 2.0
|
||||||
|
sudo su - $app <<RCOMMANDS
|
||||||
|
cd $final_path/.rbenv && git pull && cd -
|
||||||
|
cd $final_path/.rbenv/plugins/ruby-build && git pull && cd -
|
||||||
|
$final_path/.rbenv/bin/rbenv install 2.4.2 || true
|
||||||
|
$final_path/.rbenv/versions/2.4.2/bin/ruby -v
|
||||||
|
RCOMMANDS
|
||||||
|
|
||||||
|
# Create symlink for ruby 2.4.2
|
||||||
|
sudo ln -s $final_path/.rbenv/versions/2.4.2/bin/ruby /usr/bin/ruby || true
|
||||||
|
|
||||||
|
# Install Mastodon
|
||||||
|
sudo su - $app <<MCOMMANDS
|
||||||
|
pushd ~/live
|
||||||
|
$final_path/.rbenv/versions/2.4.2/bin/gem install bundler
|
||||||
|
bin/bundle install --deployment --without development test
|
||||||
|
yarn install --pure-lockfile
|
||||||
|
MCOMMANDS
|
||||||
|
|
||||||
# Apply Mastodon upgrade
|
# Apply Mastodon upgrade
|
||||||
sudo su - $app <<COMMANDS
|
sudo su - $app <<COMMANDS
|
||||||
pushd ~/live
|
pushd ~/live
|
||||||
bin/bundle install
|
#bin/bundle install
|
||||||
yarn install --pure-lockfile
|
#yarn install --pure-lockfile
|
||||||
# For 1.4.1 -> 1.4.2 migration prepare_for_foreign_keys is needed
|
# For 1.4.1 -> 1.4.2 migration prepare_for_foreign_keys is needed
|
||||||
# RAILS_ENV=production bundle exec rails mastodon:maintenance:prepare_for_foreign_keys
|
# RAILS_ENV=production bundle exec rails mastodon:maintenance:prepare_for_foreign_keys
|
||||||
RAILS_ENV=production bundle exec rails assets:clean
|
RAILS_ENV=production bundle exec rails assets:clean
|
||||||
|
|
Loading…
Add table
Reference in a new issue