From 36db68b43e4f91bbb567713a8db84c81eb94547b Mon Sep 17 00:00:00 2001 From: M33 <327-m33@git.qoto.org> Date: Wed, 23 Nov 2022 17:58:00 +0000 Subject: [PATCH] Delete check_update_misskey_git.sh --- check_update_misskey_git.sh | 57 ------------------------------------- 1 file changed, 57 deletions(-) delete mode 100755 check_update_misskey_git.sh diff --git a/check_update_misskey_git.sh b/check_update_misskey_git.sh deleted file mode 100755 index 9a08912..0000000 --- a/check_update_misskey_git.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash -# -# Try to determine quickly if an update is due -# This script may trash your instance, use with caution, make backups... -# -# Return 0 if an upgrade is needed -# - -### You will need to adjust Paths ### -# Store containers log -LOG=/var/log/docker/misskey.log -# Misskey (git) code directory -CODE=/usr/local/misskey/code -# Misskey (containers volumes) data directory -DATA=/usr/local/misskey/data -# Docker compose file name -COMPOSE=docker-compose.yml -COMPOSE=misskey-arm64.yml -# Backup destination directory -DST=/usr/local/backup -# Automatically stop, update and start the running instance -AUTOUPDATE=1 -TMP=/tmp/.update_misskey.$$ -### - -if [ ! -d $CODE ] || [ ! -d $DATA ]; then - echo "Error, you may need to adjust path in this script" - exit 100 -fi - -cd $CODE -mv package.json package.json.$$ - -# Compare version before/after pulling files -currentVersion=`grep version package.json.$$ | awk '{ print $2 }' | sed 's/\"//g' | sed 's/,//'` - -git fetch --all -git checkout origin/master -- package.json -if [ $? -ne 0 ]; then - echo "Error, bailing out" - mv package.json.$$ package.json - exit 100 -fi - -latestVersion=`grep version package.json | awk '{ print $2 }' | sed 's/\"//g' | sed 's/,//'` -rm -f package.json -mv package.json.$$ package.json - -echo -n "Current:$currentVersion Latest:$latestVersion... " -if [ "$currentVersion" == "$latestVersion" ]; then - echo "Your Misskey code is already up to date." - exit 1 -fi - -echo "Upgrade needed." - -exit 0 -- GitLab