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 and combines the pre-release and build normalization funcs since they are now the same. This provides a few main benefits: - Allows a single linker override to fully specify the version string instead of having separate ones that can only override the prerelease and build metadata portions - Provides run-time checks to ensure the full version string is valid per the semver spec regardless of whether it was specified directly in the source or provided via the linker - Is slightly more efficient since the full version string is no longer dynamically created on each invocation Finally, while here, add some comments regarding the release process to help maintainers. |
||
|---|---|---|
| .. | ||
| README.md | ||
| version_test.go | ||
| version.go | ||
version
Package version provides a single location to house the version information for dcrd and other utilities provided in the same repository.
Installation and Updating
This package is internal and therefore is neither directly installed nor needs to be manually updated.
License
Package version is licensed under the copyfree ISC License.