feat(version): append commit hash on build via ldflags #342
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR follows up the attempts on #301 and #302.
It standardize resonate binary version to:
resonate version v<VERSION>[-<PRE_RELEASE>-<TIMESTAMP>][ COMMIT_HASH] <GOOS>/<GOARCH>
where:
VERSION
: the release versionPRE_RELEASE
: can be any arbitrary string, e.g.alpha
,beta
,rc.1
, etcTIMESTAMP
: the yyyymmdd of build IF this is not a GA releaseCOMMIT_HASH
: short revision IF this is a GA releaseGOOS
: underlying OS this binary built onGOARCH
: underlying Architecture this binary built onThis also adds a new
version
subcommand for convenience and to not give an error onresonate version
for folks with muscle memory for it.Two manual intervention is needed for this workflow:
coreVersion
ininternal/version/version.go
to next logical releaseprerelease
toalpha
(ordev
, or similar) ininternal/version/version.go
prerlease
to""
ininternal/version/version.go
for GA, or just leave it as is for the restThe rest will be calculated, or generated on the fly.
Fixes: #298