1
0
mirror of https://github.com/CMiksche/gitea-auto-update synced 2025-12-11 08:27:23 +01:00

feat: get version from file

Add function to get the version from the gitea file if the web api does fail.

Should implement the idea from GH-8
This commit is contained in:
Christoph Miksche
2019-05-31 22:16:11 +02:00
parent b38143effc
commit 482df30496
4 changed files with 25 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ if not functions.is_tool("xz"):
quit()
# Version from gitea site
current_version = requests.get(settings.gtsite).json()['version']
current_version = functions.getCurrentVersion()
print ("current_version =", current_version)
# Get version tag from github and remove first char (v)
github_version_tag = requests.get(settings.gtgithubapiurl).json()['tag_name']