Skip to content

Commit 9dd1d10

Browse files
author
Matt Pearson
committed
Use '--config' instead of '--config-file'.
1 parent 5eb8199 commit 9dd1d10

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

arg-parsing-test.bats

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ write_env_file() {
2828
}
2929

3030
write_conf_file() {
31-
# Write a config-file to override '.env'.
31+
# Write a configuration file to override '.env'.
3232
cat <<-EOF > conf
3333
GIT_DEPLOY_APPEND_HASH=conf-file
3434
EOF
@@ -59,7 +59,7 @@ write_conf_file() {
5959
write_env_file
6060
write_conf_file
6161

62-
parse_args --config-file conf
62+
parse_args --config conf
6363
assert that "$append_hash" = "conf-file"
6464
}
6565

@@ -68,7 +68,7 @@ write_conf_file() {
6868
write_env_file
6969
write_conf_file
7070

71-
parse_args --config-file conf --no-hash
71+
parse_args --config conf --no-hash
7272
assert that "$append_hash" = "false"
7373
}
7474
@test ' sets a commit message with spaces in it.' {

deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Options:
1515
deploy branch.
1616
-n, --no-hash Don't append the source commit's hash to the deploy
1717
commit's message.
18-
-c, --config-file PATH Override default & environment variables' values
18+
-c, --config PATH Override default & environment variables' values
1919
with those in set in the file at 'PATH'. Must be the
2020
first option specified.
2121
@@ -28,7 +28,7 @@ Variables:
2828
These variables have default values defined in the script. The defaults can be
2929
overridden by environment variables. Any environment variables are overridden
3030
by values set in a '.env' file (if it exists), and in turn by those set in a
31-
file specified by the '--config-file' option.
31+
file specified by the '--config' option.
3232
3333
Positional Args:
3434
@@ -44,7 +44,7 @@ parse_args() {
4444
fi
4545

4646
# Set args from file specified on the command-line.
47-
if [[ $1 = "-c" || $1 = "--config-file" ]]; then
47+
if [[ $1 = "-c" || $1 = "--config" ]]; then
4848
source "$2"
4949
shift 2
5050
fi

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Do this every time you want to deploy, or have your CI server do it.
4242

4343
`-h`, `--help`: show the program's help info.
4444

45-
`-c`, `--config-file`: specify a file that overrides the script's default configuration, or those values set in `.env`. The syntax for this file should be normal `var=value` declarations. __This option _must_ come first on the command-line__.
45+
`-c`, `--config`: specify a file that overrides the script's default configuration, or those values set in `.env`. The syntax for this file should be normal `var=value` declarations. __This option _must_ come first on the command-line__.
4646

4747
`-m`, `--message <message>`: specify message to be used for the commit on `deploy_branch`. By default, the message is the title of the source commit, prepended with 'publish: '.
4848

0 commit comments

Comments
 (0)