From 2546e3b3736528dd01d369525ab7d8e70348fbaa Mon Sep 17 00:00:00 2001 From: Terry Geng Date: Mon, 30 Nov 2020 01:08:11 +0800 Subject: [PATCH] fix: Check update not checking update when testing version was selected. --- .drone.yml | 3 ++- util.py | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index e8daa6c..b5288d2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -32,7 +32,8 @@ steps: commands: - apt-get -qq update && apt-get -qq install git > /dev/null - sed -i 's/target_version = git/target_version = testing/' configuration.default.ini - - version=$(git rev-parse HEAD) + - git fetch --tags + - version=$(git describe --tags) - echo "current git commit is $version" - echo $version > /mnt/botamusique/testing-version - sed -i "s/version = 'git'/version = '$version'/" mumbleBot.py diff --git a/util.py b/util.py index d66239b..8fe9edf 100644 --- a/util.py +++ b/util.py @@ -118,8 +118,7 @@ def check_update(current_version): global log log.debug("update: checking for updates...") new_version = new_release_version(var.config.get('bot', 'target_version')) - if version.parse(new_version) > version.parse(current_version) \ - and var.config.get('bot', 'target_version') == "stable": + if version.parse(new_version) > version.parse(current_version): changelog = fetch_changelog() log.info(f"update: new version {new_version} found, current installed version {current_version}.") log.info(f"update: changelog: {changelog}")