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
Target variables #417
Merged
Merged
Target variables #417
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull Request Test Coverage Report for Build 341
💛 - Coveralls |
ssoriche
approved these changes
Jan 19, 2019
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.
Read through all the code and documentation. I really like this feature. Merge conflicts need to be cleaned up though.
Thanks @ssoriche. I'll be rebasing before I merge. |
The new `--set`/`-s` option for the `init`, `engine`, and `target` commands configures change script variables at the core, engine, and target levels, respectively. The get written to their own config section, but the new `variables` accessor on the Target object will merge them all. So far, only the target command is fully updated and tested.
And show no variables.
Tests forthcoming.
And update `verify` to also read `deploy` variables, just like `revert` does. Variables merge from most to least specific, in general as follows: 1. `--set` options 2. `target.$target.variables` 3. `engine.$engine.variables` 4. `$command.variables` 5. `core.variables` They don't work that way yet, but will soon. Other changes: * Fix a couple typos. * Eliminate duplicate calls to `$self->sqitch->config` * Document that `rework` and `checkout` also have `--set` options.
Because of the prioritization of command variables, we have to remove them here so that the commands can specify the proper hierarchies.
I forgot it was a subargument to catch, not a block. Thanks to @stefansbv for the pointer.
theory
force-pushed
the
target-variables
branch
from
January 23, 2019 19:01
261cb07
to
6b6469c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add support for core, engine, and target variable configuration, as requested in #275. The simplest way to use them is via the
--set
option on theinit
,engine
, andtarget
commands. These allow the configuration of database client variables for specific engines and targets, as well as defaults that apply to all change execution commands (deploy
,revert
,verify
,rebase
, andcheckout
). The commands merge the variables from each level in this priority order:--set-deploy
and--set-revert
options onrebase
andcheckout
.--set
optiontarget.$target.variables
engine.$engine.variables
deploy.variables
,revert.variables
, andverify.variables
core.variables
See
sqitch-configuration
for general documentation of of the hierarchy for merging variables and the documentation for each command for specifics.