Skip to content

Commit 44a35e8

Browse files
author
Matt Pearson
committed
Move args-parsing to its own file.
1 parent 3994857 commit 44a35e8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

deploy.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
set -o errexit #abort if any command fails
33

4-
main() {
4+
parse_args() {
55
# Set args from a local environment file.
66
if [ -e ".env" ]; then
77
source .env
@@ -51,6 +51,11 @@ main() {
5151
#append commit hash to the end of message by default
5252
append_hash=${GIT_DEPLOY_APPEND_HASH:-true}
5353

54+
}
55+
56+
main() {
57+
parse_args "$@"
58+
5459
enable_expanded_output
5560

5661
if ! git diff --exit-code --quiet --cached; then

0 commit comments

Comments
 (0)