aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/upgrade4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/upgrade b/scripts/upgrade
index f070bbd..d217de6 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -50,9 +50,11 @@ PULLCOMMANDS
# Switch branch to tagged release
cd $final_path/live
+url=$(curl -s https://api.github.com/repos/tootsuite/mastodon/releases/latest | sort -r | head -1 | cut -d\" -f4)
+version=$(echo $url | cut -d/ -f8)
sudo su - $app <<SWITCHCOMMANDS
pushd ~/live
-git checkout $(git tag | tail -n 1)
+git checkout $version
SWITCHCOMMANDS
# Apply Mastodon upgrade