From f234234db58d78d9ce00f3850e03895ddc051bce Mon Sep 17 00:00:00 2001 From: John Sirois Date: Sat, 17 Dec 2022 12:12:57 -0800 Subject: [PATCH] Fix up self-update to skip current version. (#21) Previously the scie-pants would update itself to its same version instead of short circuiting. --- CHANGES.md | 8 ++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- tools/src/scie_pants/update_scie_pants.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 2781efd..c727a07 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,13 @@ # Release Notes +## 0.1.9 + +This release fixes a bug using `SCIE_BOOT=update scie-pants` to have +`scie-pants` update itself to the latest stable release. Previously, it +would always update to itself if there was no greater stable version +released. Now, it properly short-circuits and informs that there is no +newer version available. + ## 0.1.8 The 1st public release of the project. diff --git a/Cargo.lock b/Cargo.lock index 97b038e..53ab3b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -606,7 +606,7 @@ dependencies = [ [[package]] name = "scie-pants" -version = "0.1.8" +version = "0.1.9" dependencies = [ "anyhow", "dirs", diff --git a/Cargo.toml b/Cargo.toml index c053236..d531b2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ members = [ [package] name = "scie-pants" -version = "0.1.8" +version = "0.1.9" edition = "2021" authors = [ "John Sirois ", diff --git a/tools/src/scie_pants/update_scie_pants.py b/tools/src/scie_pants/update_scie_pants.py index 343e22e..7b5e084 100644 --- a/tools/src/scie_pants/update_scie_pants.py +++ b/tools/src/scie_pants/update_scie_pants.py @@ -255,7 +255,7 @@ def main() -> NoReturn: maybe_release = find_latest_production_release( ptex, platform=options.platform, github_api_bearer_token=options.github_api_bearer_token ) - if not maybe_release or maybe_release.version < options.current_version: + if not maybe_release or maybe_release.version <= options.current_version: info(f"No new releases of {BINARY_NAME} were found.") sys.exit(0) release = maybe_release