[deploy_maven] allow for release repo override via command line #350
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the goal of this PR?
Allow for the release repo to be configured dynamically. With Maven Central, there is the opportunity to batch a release with a singular staging repository. Unfortunately, without some rework, it would be a little difficult to dynamically set the release repository. I don't really want to dynamically touch the
BUILD
or.bzl
files where I might have therelease_repo
defined that is passed into the rule since that could differ between repos. This change allows therelease_repo
to be overridden from a CLI such that the staging repository can be created dynamically during CI and passed to the deploy target for publishing before dynamically closing & releasing the staging repo.Related shell script
What are the changes implemented in this PR?
This is an interesting PR b/c there are a few ways to solve this. I could have modified the
.py
script to try and read from an env var. However, given that this is really a one-off URL, the potential for a stale repo being stored and used from the env was non-zero. Having to manually specify the staging repo w/in the bazel invocation seemed like a good middleground.Opinions appreciated 😄