-
Notifications
You must be signed in to change notification settings - Fork 29
Add version bootstrap tool subcommand, for capability checking #129
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 bootstrap tool subcommand, for capability checking #129
Conversation
benjyw
left a comment
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.
I like it!
I think it's fine - window is small.
That could be neat! So the script runs if it's later than PANTS_BOOTSTRAP_TOOLS and fails otherwise? |
Yeah, exactly. I've implemented something along those lines. |
benjyw
left a comment
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.
LGTM mod the best-practice of bracing vars.
Co-authored-by: Benjy Weinberger <[email protected]>
|
Oops, thanks for that. |
This expands on #128 to add another bootstrap tool subcommand:
bootstrap-version. This is designed to just be a simple number that's bumped whenever there's a feature scripts might need to query for. The version number is also automatically checked against the (numeric) value of thePANTS_BOOTSTRAP_TOOLSkey.For instance, suppose the bootstrap tools already existed (at version 1), and then
bootstrap-cache-keycommand was added, the version number would be bumped to 2, and then a consumer (such as pantsbuild/actions#6) could run something like:PANTS_BOOTSTRAP_CACHE_KEY=$(PANTS_BOOTSTRAP_TOOLS=2 ./pants bootstrap-cache-key)Notes:
bootstrap-versionrather thanversionto avoid conflict with the subcommand on real-pants(i.e../pants versionwithoutPANTS_BOOTSTRAP_TOOLS=1works, and prints the underlying pants version like 2.13.0, whereas./pants bootstrap-versionerrors out withUnknown goal: bootstrap-version)PANTS_BOOTSTRAP_TOOLSbut not supporting this versioning. Maybe the window is small enough that that doesn't matter?