aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornemsia <nemsia@nemsia.org>2017-04-28 18:08:36 +0200
committerGitHub <noreply@github.com>2017-04-28 18:08:36 +0200
commitcb43d5ad98325ac3f5956a9ff0838f555302b452 (patch)
tree7a46054227aa12637a3d74596399e4b24978d5c3
parentf79e0148cb4f388402a671f36087570ab0041b0d (diff)
parent58661b14d2fe6ff2dc12b2c30607fc5407a3ccb5 (diff)
downloadmastodon_ynh-cb43d5ad98325ac3f5956a9ff0838f555302b452.tar.gz
mastodon_ynh-cb43d5ad98325ac3f5956a9ff0838f555302b452.tar.bz2
mastodon_ynh-cb43d5ad98325ac3f5956a9ff0838f555302b452.zip
Merge pull request #4 from nemsia/patch-1
Install and Upgrade on tagged release
-rw-r--r--scripts/install5
-rw-r--r--scripts/upgrade3
2 files changed, 5 insertions, 3 deletions
diff --git a/scripts/install b/scripts/install
index 67e69b0..d58f08e 100644
--- a/scripts/install
+++ b/scripts/install
@@ -82,12 +82,13 @@ 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
+pushd $final_path/live
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
-cd $final_path/live
+pushd $final_path/live
git checkout $(git tag | tail -n 1)
CLONECOMMANDS
diff --git a/scripts/upgrade b/scripts/upgrade
index 076e3fb..bd9c46a 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)