-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add numeric tag convention support #8
Conversation
Also add a better output when tags don't match supported naming convention
lib/ra10ke.rb
Outdated
version_tags = tags.select { |f| /^[vV]\d/.match(f) } | ||
latest_ref = version_tags.keys.sort.last | ||
elsif ref.match(/^\d[\.\d]*/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this block is not really needed, just improve the regexp to make the [vV] part optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It allows to filter tags according to the convention found if the Puppetfile ref.
If for some historical reason a repo has the both naming convention, this block prevent from getting weird sort result.
It's not necessary, tell me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I mean is instead of having this elsif block, to make the regexp on line 58 to something like /^([vV)]?\d/
, or even better to use your improvement and have /^([vV])?\d[\.\d]*/
lib/ra10ke.rb
Outdated
version_tags = tags.select { |f| /^[vV]\d/.match(f) } | ||
latest_ref = version_tags.keys.sort.last | ||
elsif ref.match(/^\d[\.\d]*/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I mean is instead of having this elsif block, to make the regexp on line 58 to something like /^([vV)]?\d/
, or even better to use your improvement and have /^([vV])?\d[\.\d]*/
Also add a better output when tags don't match supported naming convention