decred / dcrctl

Command-line client for interacting with the JSON-RPC servers of dcrd and dcrwallet
https://decred.org
ISC License
4 stars 17 forks source link

version: Support single override and add git hash. #44

Closed davecgh closed 2 years ago

davecgh commented 2 years ago

This reworks the way versions are handled internally to reverse the semantics such that the individual semver components (major, minor, patch, prerelease, and buildmetadata) are parsed from a full string and exported at init time.

Also, since the version is now parsed and verified to be accurate, it updates the pre-release parsing to properly support dots as required by the spec.

Finally, starting with Go version 1.18, it adds the git commit hash to the version string as buildmetadata when no buildmetadata is otherwise specified.

This provides a few main benefits:

Finally, while here, add some comments regarding the release process to help maintainers.