Add positional args for directory, branch, and repository.#20
Open
matro wants to merge 15 commits intoX1011:masterfrom
Open
Add positional args for directory, branch, and repository.#20matro wants to merge 15 commits intoX1011:masterfrom
matro wants to merge 15 commits intoX1011:masterfrom
Conversation
This implements '[<options>] [<directory> [<branch> [<repository]]]' but requires all <options> come before the positional args.
Contributor
Author
|
This feel a little hacky to me, but it seems to work in my testing. |
Owner
|
as with #19, i'm going to wait until we have tests for order of preference to merge this, cause i think the env variables will override these arguments as it is currently implemented. |
Contributor
Author
|
Got some tests committed here, though I'm still working on the positional args themselves. |
This was referenced Dec 16, 2015
matro
referenced
this pull request
in matro/git-directory-deploy
Dec 16, 2015
This should allow a config. file specified on the command-line to
overwrite values set in '.env', which in turn ovewrite values set
in the environment. Values set for these same vars in the args-
parsing loop should then overwrite all of the above.
Anything left unset by environment vars above are then covered when
the "internal" vars are populated by the `var=${ENV_VAR:-default}`
lines.
720240f to
f6036b5
Compare
Contributor
Author
|
I've merged master into this, and added a couple more commits. I think this is working now. All tests pass (including one specifically for the positional args), and there're docs for this. |
added 4 commits
December 18, 2015 07:33
Without this, the script continues to execute, and we see this error: ``` ./deploy.sh: line 124: [: =: unary operator expected Deploy directory '' does not exist. Aborting. ```
This file contains hidden or 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
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.
This implements
[<options>] [<directory> [<branch> [<repository]]]but requires all<options>come before the positional args.Fixes part of #14.