Skip to content
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

Adding helpers for semver usage #385

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Murazaki
Copy link

Attempt to fix #384

I kinda fail at getting why IsRawStatement exists, and also why {{major}}.{{minor}} (in tag13 test) is supposed to give {{version}} ?

Hopefully this works properly and helps users get the best from the tags.

@Murazaki Murazaki force-pushed the feature/semver-supplementary-data branch 2 times, most recently from c33d7d6 to 9ee6203 Compare February 13, 2024 18:12
Signed-off-by: Mehdi Benadel <mehdi.benadel@gmail.com>
@Murazaki Murazaki force-pushed the feature/semver-supplementary-data branch from 9ee6203 to 17558ba Compare February 13, 2024 18:16
@Murazaki
Copy link
Author

Murazaki commented Feb 14, 2024

Seems like we might be having an issue here in terms of semver compliance of docker tags :

After the image name, the optional TAG is a custom, human-readable manifest identifier that's typically a specific version or variant of an image. The tag must be valid ASCII and can contain lowercase and uppercase letters, digits, underscores, periods, and hyphens. It can't start with a period or hyphen and must be no longer than 128 characters. If you don't specify a tag, the command uses latest by default.

https://docs.docker.com/engine/reference/commandline/image_tag/

@crazy-max
Copy link
Member

Seems like we might be having an issue here in terms of semver compliance of docker tags :

After the image name, the optional TAG is a custom, human-readable manifest identifier that's typically a specific version or variant of an image. The tag must be valid ASCII and can contain lowercase and uppercase letters, digits, underscores, periods, and hyphens. It can't start with a period or hyphen and must be no longer than 128 characters. If you don't specify a tag, the command uses latest by default.

https://docs.docker.com/engine/reference/commandline/image_tag/

Ah completely forgot about this limitation 😞

@Murazaki
Copy link
Author

Ok, so until we get any news from those, we can use this but with a hyphen instead of a plus ? kinda breaks readability of semver but what can we do ? Use another letter/keyword ? An underscore maybe ?

docker/cli#4877
distribution/distribution#1201
opencontainers/distribution-spec#154

@crazy-max
Copy link
Member

crazy-max commented Feb 26, 2024

but with a hyphen instead of a plus ? kinda breaks readability of semver but what can we do ?

Don't think we have much choice atm than waiting. Hyphens are specially treated by semver spec to handle prerelease. That would break versioning. Feel free to put this PR in draft or close it in the meantime but we can keep the issue opened for tracking.

@crazy-max crazy-max marked this pull request as draft March 13, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

semver tag : allow outputing build information (part after plus)
2 participants