Skip to content

make build/version -r 1-based so dev packages are revision 1 - #47

Merged
pvinh-spike merged 1 commit into
masterfrom
pvinh/fix-dev-build-number
Jul 30, 2026
Merged

make build/version -r 1-based so dev packages are revision 1#47
pvinh-spike merged 1 commit into
masterfrom
pvinh/fix-dev-build-number

Conversation

@pvinh-spike

@pvinh-spike pvinh-spike commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #42. build/version -r was 0-based on release lines (0 on the tag) with the Makefiles adding +1, but it returned 1 on dev branches — so dev packages came out as revision 2 (x.y.z-<n>-g<sha>-2) while master releases were 1. This makes -r uniformly 1-based so dev packages are -1, consistent with the tagged release.

Change

  • build/version: move the +1 into the -r (build_only) path — applied on release lines only; dev branches already return 1. -r is now the 1-based build number directly.
  • pkg/Makefile.{deb,rpm}: BUILD_NUMBER = build/version -r (dropped the expr … + 1).

_build_number and the default/full-mode output (bare x.y.z on the release tag, 0-based -n commits-ahead count) are unchanged.

Package names

before after
master on tag asmt_x.y.z-1<os>… asmt_x.y.z-1<os>… (unchanged)
master N past tag asmt_x.y.z-<N+1><os>… same (unchanged)
dev branch asmt_x.y.z-<n>-g<sha>-2<os>… asmt_x.y.z-<n>-g<sha>-1<os>…

Brings asmt in line with the 1-based convention in aerospike/act#81 and aerospike-tools-validation#41.

Test plan

  • bash -n build/version; scratch-repo verification of master on/off-tag, dev
  • -r = 1 on dev and on the tagged release, 3 two commits past
  • default/full mode output confirmed unchanged (bare release, dev full describe)

build/version -r was 0-based on release lines (0 on the tag) with the Makefiles
adding +1, but it returned 1 on dev branches, so dev packages came out as
revision 2 (x.y.z-<n>-g<sha>-2) while master releases were 1.

Move the +1 into the -r path (release lines only; dev is already 1) and drop it
from the Makefiles, so -r is uniformly 1-based: the tagged release and dev builds
are build number 1.

  master on tag  asmt_x.y.z-1<os>...            (unchanged)
  master N past  asmt_x.y.z-<N+1><os>...        (unchanged)
  dev            asmt_x.y.z-<n>-g<sha>-1<os>... (was -2)

Default/full mode (bare x.y.z on the release, 0-based -n commits-ahead count) is
left unchanged. Matches the 1-based convention in aerospike/act#81 and
aerospike-tools-validation#41.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pvinh-spike
pvinh-spike requested a review from mcoberly2 July 28, 2026 23:32
@pvinh-spike
pvinh-spike merged commit f5f249e into master Jul 30, 2026
7 checks passed
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