Skip to content

Fix stale runtime version string and automate version bumps - #37

Merged
whiteh merged 7 commits into
masterfrom
fix-publish-action
Jul 31, 2026
Merged

Fix stale runtime version string and automate version bumps#37
whiteh merged 7 commits into
masterfrom
fix-publish-action

Conversation

@whiteh

@whiteh whiteh commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Fix stale runtime version string and automate version bumps

Summary

  • _N._VERSION in src/lua_resty_netacea.lua was still hardcoded to 1.6.0 despite the rockspec having moved to 1.6.2-0 in an earlier release — so require("lua_resty_netacea")._VERSION reported the wrong version at runtime. Bumped it to 1.6.3 in lockstep with a new rockspec (lua_resty_netacea-1.6.3-0.rockspec).
  • Extended check_rockspec_version.sh to also assert that _N._VERSION matches the rockspec's release version, so this can't silently drift again — it previously only checked the rockspec filename against its own version field and against existing git tags.
  • Added bump_version.sh <new-version> to automate the release checklist: renames the rockspec, updates its version field, updates _N._VERSION, and runs check_rockspec_version.sh to confirm everything agrees.
  • Updated CONTRIBUTING.md's "Updating the version number" section to point at the new script instead of the old manual 3-step checklist.

Why

Manually keeping the rockspec version and the in-code version string in sync is easy to forget, and check_rockspec_version.sh had no way to catch it — it verified the rockspec was internally consistent but never looked at the module source. This fixes today's instance of the bug and closes the gap so CI catches the next one.

Test plan

  • ./check_rockspec_version.sh passes against the new rockspec/version.
  • ./bump_version.sh 1.6.4 exercised manually (renamed rockspec, updated both version strings, ran the check successfully), then reverted back to 1.6.3 since that was just a dry run.
  • CI (build.yml) runs check_rockspec_version.sh as before — should still pass on this branch.

@whiteh
whiteh requested a review from a team as a code owner July 31, 2026 08:44
@whiteh whiteh changed the title Fix publish action Fix stale runtime version string and automate version bumps Jul 31, 2026
@whiteh
whiteh merged commit f52e04c into master Jul 31, 2026
3 checks passed
@whiteh
whiteh deleted the fix-publish-action branch July 31, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants