-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
semver tag : allow outputing build information (part after plus) #384
Comments
Can you show an example of versioning? It should be compliant with https://semver.org/ |
I'm working on a fork. It would be better to be able to show that particular info in the docker tag : 2.3.8+fork.1.0.1 Of course it doesn't need to be default, and it can be on a per name basis. I was envisioning a variable |
Thanks for your feedback. I don't think we need an extra variable, build metadata for semver should be included whatever the case. |
Thanks for taking that into account. I was looking at the code and I can see some choices have been made either in metadata-action or in semver that made it a bit difficult to add prerelease and build values with handlebars. I was looking into ways to make those available with helpers, here is what I came up with (there's still an issue on the type of the entry data, register might happen at the wrong time) handlebars.registerHelper("prereleaseMetadata", function () {
return (this.prerelease ? "-" + this.prerelease.join(".") : "");
});
handlebars.registerHelper("buildMetadata", function () {
return (this.build ? "+" + this.build.join(".") : "");
});
handlebars.registerHelper("completeVersion", function () {
return (
[this.major, this.minor, this.patch].join(".") +
(this.prerelease ? "-" + this.prerelease.join(".") : "") +
(this.build ? "+" + this.build.join(".") : "")
);
}); I put the changes in a branch, but I'm still working on adding a handlebar environment around that. |
This ensures metadata is not stripped from the version as reported in docker/metadata-action#384
This ensures metadata is not stripped from the version as reported in docker/metadata-action#384
This ensures metadata is not stripped from the version as reported in docker/metadata-action#384
This ensures metadata is not stripped from the version as reported in docker/metadata-action#384
This ensures metadata is not stripped from the version as reported in docker/metadata-action#384
This ensures metadata is not stripped from the version as reported in docker/metadata-action#384
Description
Please allow outputting "+" prefixed information in semver tags, as some of us uses it for fork versioning.
The text was updated successfully, but these errors were encountered: