move function in gitea-update

This commit is contained in:
EV21 committed 2022-03-08 19:10:37 +01:00
1 parent 26ecb6ce66
commit 49ea4272cd
1 file changed
+14 -14
+14 -14
View File
@@ -195,6 +195,20 @@ ORG=go-gitea # Organisation or GitHub user
REPO=gitea REPO=gitea
GITHUB_API_URL=https://api.github.com/repos/$ORG/$REPO/releases/latest GITHUB_API_URL=https://api.github.com/repos/$ORG/$REPO/releases/latest
function do_update_procedure
{
wget --quiet --progress=bar:force --output-document $TMP_LOCATION/gitea "$DOWNLOAD_URL"
verify_file
supervisorctl stop gitea
mv --verbose $TMP_LOCATION/gitea "$GITEA_LOCATION"
chmod u+x --verbose "$GITEA_LOCATION"
echo "Start gitea migration"
$GITEA_LOCATION migrate
supervisorctl start gitea
sleep 5
supervisorctl status gitea
}
function get_local_version function get_local_version
{ {
LOCAL_VERSION=$($GITEA_LOCATION --version | LOCAL_VERSION=$($GITEA_LOCATION --version |
@@ -237,20 +251,6 @@ function verify_file
fi fi
} }
function do_update_procedure
{
wget --quiet --progress=bar:force --output-document $TMP_LOCATION/gitea "$DOWNLOAD_URL"
verify_file
supervisorctl stop gitea
mv --verbose $TMP_LOCATION/gitea "$GITEA_LOCATION"
chmod u+x --verbose "$GITEA_LOCATION"
echo "Start gitea migration"
$GITEA_LOCATION migrate
supervisorctl start gitea
sleep 5
supervisorctl status gitea
}
## this is a helper function to compare two versions as a "lower than" operator ## this is a helper function to compare two versions as a "lower than" operator
function version_lt function version_lt
{ {