feat: Use Version instead of Git tag to for .deb/.rpm #1157
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 commit will allow to build package from a snapshot without have a package version of "0.0.0". Instead of using ctx.Git.CurrentTag, it will use ctx.Version. During a release both are the same value (with prefix "v" removed if it exists), so release pipeline stay unchanged.
With this changes, we can build package from snapshot which is useful in our use-case where we built package after each commit to master. We don't want to tag each commit but still want to build usable packages (e.g. with a version - coming from snapshot pipe) and not "0.0.0").
In addition, is allow us to build package with version that does not match SemVer (like 19.06.27.084010 which is the date + time converted to a version).
The package version i'm talking is the one set in package metadata, not just filename. That is the one visible for deb package using: