mirror of
https://github.com/EV21/uberspace-helper.git
synced 2026-10-08 04:43:18 +02:00
move function in gitea-update
This commit is contained in:
1 file changed
+14
-14
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user