feat: update makefile to generate valid semver for dev builds #1916
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.
Summary
Ensure Dev Builds produce valid SemVer versions
This PR updates the
Makefile
to ensure that development builds generate valid SemVer versions, making it easier for tools to correctly identify the asdf version in different environments.Currently, dev builds produce versions like:
$ asdf --version asdf version "fdcd8af-dev"
This format is not a valid SemVer version and can cause issues for tools that rely on version comparisons.
With this PR, dev builds will now follow SemVer-compatible formatting, ensuring they always sort higher than the latest tagged release. For example, after 9 commits past v0.16.1, the output would be:
$ asdf --version asdf version "v0.16.2-dev.9+856cc1d"
This ensures a consistent versioning scheme while keeping the commit hash for traceability.
Other Information
This addresses the concern I raised in this comment: #1901 (comment)