diff options
| -rw-r--r-- | scripts/install | 6 | ||||
| -rw-r--r-- | scripts/upgrade | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/scripts/install b/scripts/install index 5d1e75e..b6be33c 100644 --- a/scripts/install +++ b/scripts/install @@ -82,13 +82,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 +pushd $final_path/live +sudo git checkout $(git tag | tail -n 1) + # Be king rewind (/var/cache/yunohost/from_file/scripts) popd diff --git a/scripts/upgrade b/scripts/upgrade index 7dad333..f909d05 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,8 +38,9 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf sudo systemctl stop mastodon-*.service # Update Mastodon +pushd /opt/mastodon/live sudo su - $app <<COMMANDS -cd live +pushd ~/live git fetch git pull https://github.com/tootsuite/mastodon.git master git checkout $(git tag | tail -n 1) |
