-
Notifications
You must be signed in to change notification settings - Fork 419
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 version check for minor pin #365
Conversation
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.
@ralucasg This is the right idea -- it can be simplified down to:
{% if salt_release.split('.')|length >= 3 %}
{% set salt_release = 'archive/' ~ salt_release %}
{% endif %}
So just fixing the condition and the Jinja concatenation operator (~
instead of +
).
…mulas#364) * All minor releases appear in an `archive` sub-directory. * Resolves main bug in GitHub issue saltstack-formulas#364. * Simplification of original GitHub PR saltstack-formulas#365 by @ralucasg.
@myii I remember testing it against some corner cases and getting some failures. Sadly it did not cross my mind to write it down and I don't quite remember when it was breaking. It might have been on the "Pin to Major Release" option since those links don't have 'archive/' in them or maybe on something else. I'm truly sorry I did not add my test results as a comment on the PR. |
@ralucasg Thanks for your response. The edge case was due to: {% if check_version|length > 1 %} That would end up being applied for minor and major releases. Changing that to More importantly, I always prefer credit going to the person who has attempted to solve the problem. Your solution was virtually there and I'd be happy to to switch out my PR #394 to revive your PR #365 again. $ git commit --amend --author="Your Name <you@example.com>" Let me know how you would like to proceed. If you're not too bothered, we can just leave #394 as-is. |
…mulas#364) * All minor releases appear in an `archive` sub-directory. * Resolves main bug in GitHub issue saltstack-formulas#364. * Simplification of original GitHub PR saltstack-formulas#365 by @ralucasg.
@myii Thank you so much, you didn't have to go that far as you added the correct solution and tested it so I believe you deserve the credits more than me. |
@ralucasg You're welcome.
Actually, it doesn't work like that. If you had left this PR open, then this would have been the process:
So we've just recreated that here -- nothing extra. |
No description provided.