Skip to content

fix: ignore development version suffixes when checking for updates - #726

Merged
mwbrooks merged 2 commits into
mainfrom
zimeg-fix-update-dev-version
Oct 28, 2026
Merged

mwbrooks merged 2 commits into
mainfrom
zimeg-fix-update-dev-version

Conversation

@zimeg

@zimeg zimeg commented Oct 27, 2026

Copy link
Copy Markdown
Member

Changelog

Development and feature builds of the Slack CLI are no longer prompted to "upgrade" to the release they were built from.

Summary

This pull request ignores the prerelease suffix of the current version when checking for updates, so development builds aren't suggested a downgrade.

  • Development builds use git describe versions like v4.11.0-9-g154975a, and feature builds are tagged like v4.11.0-example-feature. Both come after the v4.11.0 release, but semver orders prereleases before it, so the update check suggested v4.11.0-9-g154975a → 4.11.0.
  • Our versioning scheme doesn't increment the version before attaching rc or feature tags, so comparing against v4.11.0 holds for suggesting the next stable version. A newer release like v4.12.0 is still suggested.
  • This comes before upcoming work to update the CLI automatically instead of prompting, where a mistaken downgrade would happen without asking.

Preview

$ ./bin/slack --version
Using slack v4.11.0-9-g154975a
$ ./bin/slack upgrade

Before

🌱 A new version of the Slack CLI is available:
   v4.11.0-9-g154975a → 4.11.0

After

✔ You are using the latest Slack CLI version

Testing

  1. Build this branch with make build and confirm ./bin/slack --version shows a vX.Y.Z-N-g<hash> version
  2. Run ./bin/slack upgrade and confirm "You are using the latest Slack CLI version"
  3. Run SLACK_TEST_VERSION=v4.11.0-example-feature ./bin/slack upgrade and confirm the same message
  4. Run SLACK_TEST_VERSION=v4.10.0 ./bin/slack upgrade and confirm a newer version is still suggested

Notes

  • If release candidates are published as vX.Y.Z-rc.N before vX.Y.Z in the future, this comparison would need to treat those as earlier than the release.

Requirements

🤖 Generated with Claude Code

Development builds use "git describe" versions such as v4.11.0-9-g154975a,
and feature builds are tagged as v4.11.0-example-feature. Both are cut on
top of the v4.11.0 release, but semver orders them before it, so the update
check suggested "upgrading" to the release they're built from.

The prerelease suffix of the current version is now ignored when comparing,
since our versioning doesn't increment the version before attaching rc or
feature tags. Newer stable releases are still suggested.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg added this to the Next Release milestone Oct 27, 2026
@zimeg zimeg added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch Use on pull requests to describe the release version increment labels Oct 27, 2026
@zimeg zimeg self-assigned this Oct 27, 2026
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.12%. Comparing base (ef296d4) to head (051bf35).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #726      +/-   ##
==========================================
- Coverage   78.12%   78.12%   -0.01%     
==========================================
  Files         238      238              
  Lines       18114    18115       +1     
==========================================
  Hits        14152    14152              
- Misses       3962     3963       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zimeg
zimeg marked this pull request as ready for review October 27, 2026 22:53
@zimeg
zimeg requested a review from a team as a code owner October 27, 2026 22:53
@mwbrooks
mwbrooks enabled auto-merge (squash) October 28, 2026 22:10

@mwbrooks mwbrooks left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Thanks @zimeg! So good to see the upgrade command getting some love and attention, especially with auto-update on the way.

@mwbrooks
mwbrooks merged commit 6f2fa68 into main Oct 28, 2026
13 checks passed
@mwbrooks
mwbrooks deleted the zimeg-fix-update-dev-version branch October 28, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants