minor: small refactorings

This commit is contained in:
EV21 committed 2022-07-31 10:11:09 +02:00
1 parent 2404c956d1
commit d041330627
2 files changed
+2 -7

No files matched your search

+2 -6
View File
@@ -147,9 +147,6 @@ NO_REPLY_ADDRESS = noreply.${USER}.uber.space
ENABLED = true
MAILER_TYPE = sendmail
FROM = ${USER}@uber.space
[repository]
DEFAULT_BRANCH = main
end_of_content
}
@@ -165,9 +162,9 @@ autorestart=true
end_of_content
}
function get_latest_version
function get_download_url
{
curl --silent $GITHUB_API_URL > "$TMP_LOCATION"/github_api_response.json
curl --silent "$GITHUB_API_URL" > "$TMP_LOCATION"/github_api_response.json
TAG_NAME=$(jq --raw-output '.tag_name' "$TMP_LOCATION"/github_api_response.json)
LATEST_VERSION=${TAG_NAME:1}
DOWNLOAD_URL=$(jq --raw-output '.assets[].browser_download_url' "$TMP_LOCATION"/github_api_response.json |
@@ -224,7 +221,6 @@ function do_update_procedure
supervisorctl stop gitea
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"
supervisorctl start gitea
-1
View File
@@ -15,7 +15,6 @@ function do_update_procedure
supervisorctl stop gitea
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"
supervisorctl start gitea