mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-08 16:30:28 +03:00
[checkupdates] Only update if version code is grater
Don't change the current versions in case there is an error in the check_* methods or upstream screwed up.
This commit is contained in:
parent
37e3142610
commit
39c55d799b
2 changed files with 15 additions and 1 deletions
|
|
@ -511,12 +511,16 @@ def checkupdates_app(app):
|
|||
logging.warning(logmsg)
|
||||
elif vercode == app.CurrentVersionCode:
|
||||
logging.info("...up to date")
|
||||
else:
|
||||
elif int(vercode) > int(app.CurrentVersionCode):
|
||||
logging.debug("...updating - old vercode={0}, new vercode={1}".format(
|
||||
app.CurrentVersionCode, vercode))
|
||||
app.CurrentVersion = version
|
||||
app.CurrentVersionCode = str(int(vercode))
|
||||
updating = True
|
||||
else:
|
||||
logging.info("Refusing to auto update, since the current version is newer")
|
||||
logging.debug("...old vercode={0}, new vercode={1}".format(
|
||||
app.CurrentVersionCode, vercode))
|
||||
|
||||
commitmsg = fetch_autoname(app, tag)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue