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

Docker tag version must respect semver.org spec #151

Merged
merged 2 commits into from May 10, 2022

Conversation

CAMOBAP
Copy link
Contributor

@CAMOBAP CAMOBAP commented May 3, 2022

Intro

docker/metadata-action step force us to use semver.org. If we pass version which doesn't conform to semver.org spec if will 'silently fail' like this:

Warning: v1.5.15pre1 is not a valid semver. More info: https://semver.org/
Warning: v1.5.15pre1 is not a valid semver. More info: https://semver.org/
Warning: v1.5.15pre1 is not a valid semver. More info: https://semver.org/
Warning: No Docker image version has been generated. Check tags input.
Warning: No Docker tag has been generated. Check tags input.

Proposed solution

A script which will be used for such conversion was added to metanorma-build-scripts collection https://github.com/metanorma/metanorma-build-scripts/blob/main/gemver-to-semver.rb

For now it supports chocolatey and semver flags

Other possible solutions

@CAMOBAP CAMOBAP self-assigned this May 3, 2022
@ronaldtse
Copy link
Contributor

ronaldtse commented May 3, 2022

Thank you @CAMOBAP for the investigation, let’s migrate to a semver format.

On the semver site it says:

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92, 1.0.0-x-y-z.–.

So we can use “alpha” or “pre” too.

FYI @opoudjis

@ronaldtse
Copy link
Contributor

@CAMOBAP I'm totally fine with this. I believe @opoudjis will also update gem versioning for prerelease versions in a format consistent with semver, in metanorma/metanorma-cli#276.

@opoudjis says that encoding 1.1.1-alpha in gemspec turns version into 1.1.1.pre.alpha in gem version, it is being transformed into "pre".

@ronaldtse ronaldtse added the enhancement New feature or request label May 10, 2022
@opoudjis
Copy link
Contributor

@CAMOBAP @ronaldtse Note: I cannot keep up with notifications. If you need me to know of something and action it within the month, paste the ticket to Skype, or put it on the Metanorma board under Urgent or Triage.

@CAMOBAP
Copy link
Contributor Author

CAMOBAP commented May 10, 2022

@ronaldtse @opoudjis thanks for the feedback

Anyway, I propose to merge this PR just in case to properly handle/convert the version, how do you think?

@ronaldtse
Copy link
Contributor

Please merge. Thanks!

@CAMOBAP CAMOBAP merged commit 5f94345 into main May 10, 2022
@CAMOBAP CAMOBAP deleted the bugfix/convert-version-to-semver branch May 10, 2022 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants