Skip to content

Commit

Permalink
Fix up self-update to skip current version. (#21)
Browse files Browse the repository at this point in the history
Previously the scie-pants would update itself to its same version
instead of short circuiting.
  • Loading branch information
jsirois authored Dec 17, 2022
1 parent bb62b59 commit f234234
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [

[package]
name = "scie-pants"
version = "0.1.8"
version = "0.1.9"
edition = "2021"
authors = [
"John Sirois <john.sirois@gmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion tools/src/scie_pants/update_scie_pants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f234234

Please sign in to comment.