-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #312 from tschaub/git-default
Add default value for git option
- Loading branch information
Showing
3 changed files
with
34 additions
and
38 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,27 +26,35 @@ function main(args) { | |
.option( | ||
'-s, --src <src>', | ||
'Pattern used to select which files to publish', | ||
'**/*' | ||
ghpages.defaults.src | ||
) | ||
.option( | ||
'-b, --branch <branch>', | ||
'Name of the branch you are pushing to', | ||
'gh-pages' | ||
ghpages.defaults.branch | ||
) | ||
.option( | ||
'-e, --dest <dest>', | ||
'Target directory within the destination branch (relative to the root)', | ||
'.' | ||
ghpages.defaults.dest | ||
) | ||
.option('-a, --add', 'Only add, and never remove existing files') | ||
.option('-x, --silent', 'Do not output the repository url') | ||
.option('-m, --message <message>', 'commit message', 'Updates') | ||
.option( | ||
'-m, --message <message>', | ||
'commit message', | ||
ghpages.defaults.message | ||
) | ||
.option('-g, --tag <tag>', 'add tag to commit') | ||
.option('--git <git>', 'Path to git executable') | ||
.option('--git <git>', 'Path to git executable', ghpages.defaults.git) | ||
.option('-t, --dotfiles', 'Include dotfiles') | ||
.option('-r, --repo <repo>', 'URL of the repository you are pushing to') | ||
.option('-p, --depth <depth>', 'depth for clone', 1) | ||
.option('-o, --remote <name>', 'The name of the remote', 'origin') | ||
.option('-p, --depth <depth>', 'depth for clone', ghpages.defaults.depth) | ||
.option( | ||
'-o, --remote <name>', | ||
'The name of the remote', | ||
ghpages.defaults.remote | ||
) | ||
.option( | ||
'-u, --user <address>', | ||
'The name and email of the user (defaults to the git config). Format is "Your Name <[email protected]>".' | ||
|
@@ -55,7 +63,7 @@ function main(args) { | |
'-v, --remove <pattern>', | ||
'Remove files that match the given pattern ' + | ||
'(ignored if used together with --add).', | ||
'.' | ||
ghpages.defaults.only | ||
) | ||
.option('-n, --no-push', 'Commit only (with no push)') | ||
.parse(args); | ||
|
@@ -81,6 +89,7 @@ function main(args) { | |
message: program.message, | ||
tag: program.tag, | ||
git: program.git, | ||
depth: program.depth, | ||
dotfiles: !!program.dotfiles, | ||
add: !!program.add, | ||
only: program.remove, | ||
|
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
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