Skip to content

fix(cli): ignore floating major tags when resolving latest version#714

Merged
Chemaclass merged 1 commit into
mainfrom
fix/upgrade-ignore-floating-major-tag
Jun 9, 2026
Merged

fix(cli): ignore floating major tags when resolving latest version#714
Chemaclass merged 1 commit into
mainfrom
fix/upgrade-ignore-floating-major-tag

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

Summary

The 0.39.0 release published the floating v0 tag for the GitHub Action (#700). bashunit::helper::get_latest_tag sorts all remote tags with sort -Vr, and v0 sorts above every exact version, so bashunit upgrade resolved v0 as the latest version and tried to download a release asset that does not exist.

This broke two CI jobs on main (Bash 3.0 Compatibility and Tests/Alpine) via tests/acceptance/bashunit_upgrade_test.sh, and breaks bashunit upgrade at runtime.

Fix

Restrict latest-tag candidates to exact-version tags (^[0-9]+\.[0-9]+(\.[0-9]+)?$) before sorting.

Verification

  • New unit test test_get_latest_tag_ignores_floating_major_tags (RED: returned v0; GREEN: returns 0.39.0)
  • tests/acceptance/bashunit_upgrade_test.sh passes against the real repo (downloads the 0.39.0 asset)
  • Full suite: 1110 passed (sequential and --parallel)
  • Bash 3.2 (/bin/bash): helpers + upgrade tests green
  • make sa, make lint, shfmt clean

The new v0 floating Action tag sorted above exact versions in
get_latest_tag, so 'bashunit upgrade' tried to download a v0 release
asset that does not exist. Restrict candidates to exact-version tags.
@Chemaclass Chemaclass added the bug Something isn't working label Jun 9, 2026
@Chemaclass Chemaclass self-assigned this Jun 9, 2026
@Chemaclass Chemaclass merged commit 5422b13 into main Jun 9, 2026
31 checks passed
@Chemaclass Chemaclass deleted the fix/upgrade-ignore-floating-major-tag branch June 9, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant