From ac21cc5c3891661d0b6ff96852b034eeb14c2fea Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Wed, 10 Jun 2020 14:59:46 -0300 Subject: [PATCH] [improvement][appimage] able to update AppImages with continuous releases --- CHANGELOG.md | 2 ++ bauh/gems/appimage/controller.py | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8c2fa13..c93007a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [0.9.6] 2020 ### Improvements +- AppImage + - able to update AppImages with continuous releases - UI - filters algorithm speed and sorting ### Fixes diff --git a/bauh/gems/appimage/controller.py b/bauh/gems/appimage/controller.py index a5891c04..f0565562 100644 --- a/bauh/gems/appimage/controller.py +++ b/bauh/gems/appimage/controller.py @@ -223,7 +223,18 @@ class AppImageManager(SoftwareManager): for tup in cursor.fetchall(): for app in res.installed: if app.name.lower() == tup[0].lower() and (not app.github or app.github.lower() == tup[1].lower()): - app.update = LooseVersion(tup[2]) > LooseVersion(app.version) if tup[2] else False + continuous_version = app.version == 'continuous' + continuous_update = tup[2] == 'continuous' + if continuous_version and not continuous_update: + app.update = True + elif continuous_update and not continuous_version: + app.update = False + else: + try: + app.update = LooseVersion(tup[2]) > LooseVersion(app.version) if tup[2] else False + except: + app.update = False + traceback.print_exc() if app.update: app.latest_version = tup[2]