-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
introduce get-release-version
in docker helper
#13006
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
Conversation
Helper Script Tests32 tests 32 ✅ 0s ⏱️ Results for commit abb4572. ♻️ This comment has been updated with latest results. |
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.
Thanks, @eruditmorina for the contribution on the docker-helper!
I would love to learn more about your use case. Why do you need to source the helper? Right now the API is very clear and limited. Sourcing the script could mean that you might want to use functions that are not explicitly exposed via the API, which I would be very cautious about (because it might break at any point in time).
@alexrashed Currently we can make use of |
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.
Thanks! Honestly, that is actually pretty dangerous, there is a good chance that _is_release_commit
might just be changed without any notice, I was actually shortly afraid we just broke your usage with #12943.
Please make an explicit operation and tests for it, which will make sure that we won't break your code without any notice or even knowledge about the usage.
It seems like you want to determine if your HEAD in currently a release, which sounds like a very useful extension to the script! Something like is-release
?
get-release-version
in docker helper
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.
Thanks a lot for jumping on the comments! 💯
The change is looking great, I think this makes it absolutely clear that this is a public API of the helper. I just added a comment concerning the exit code (which I think is quite important?). Happy to discuss / help / assist!
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.
Nice! Thanks for following up on the last comment! This is looking great now and should make it super-easy for your use-case to use the helper, while making sure that we don't break it in the long run! 💯
Motivation
HEAD
is a release tag viadocker-helper.sh
.Changes
get-release-version
command which checks if commit is a release, and if so, outputs the version. Otherwise just a message telling that the commit is not a release.