aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authornemsia <nemsia@nemsia.org>2018-03-22 13:27:33 +0100
committerGitHub <noreply@github.com>2018-03-22 13:27:33 +0100
commita8d527d2ab1928d915e7eaa36020c79b77143e50 (patch)
treed7468e5daab6dbc71a561ca25c74b01b8304105f /scripts
parent7db022c2cc3d6e9fa2e26803c4a424a3bb8c9bd4 (diff)
parent244edb7dc5c84be752e6978abbe59e9b73f521b1 (diff)
downloadmastodon_ynh-a8d527d2ab1928d915e7eaa36020c79b77143e50.tar.gz
mastodon_ynh-a8d527d2ab1928d915e7eaa36020c79b77143e50.tar.bz2
mastodon_ynh-a8d527d2ab1928d915e7eaa36020c79b77143e50.zip
Merge branch 'upgrade-from-pre-release' into master
Diffstat (limited to 'scripts')
-rw-r--r--scripts/install3
-rw-r--r--scripts/upgrade3
2 files changed, 2 insertions, 4 deletions
diff --git a/scripts/install b/scripts/install
index 3d5172f..d9430a9 100644
--- a/scripts/install
+++ b/scripts/install
@@ -102,10 +102,9 @@ CLONECOMMANDS
# Switch branch to tagged release
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
pushd ~/live
-git checkout $version
+git checkout $(git tag -l | sort -V | tail -n 1)
SWITCHCOMMANDS
# Be king rewind (/var/cache/yunohost/from_file/scripts)
diff --git a/scripts/upgrade b/scripts/upgrade
index 8e33ce8..6ab3a13 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -50,10 +50,9 @@ PULLCOMMANDS
# Switch branch to tagged release
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
pushd ~/live
-git checkout $version
+git checkout $(git tag -l | sort -V | tail -n 1)
SWITCHCOMMANDS
# upgrade Node.js v4 to v6