Skip to content

Commit c233d37

Browse files
Added a QUIET env var to supress keyboard confirmation
1 parent deb2d4f commit c233d37

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

scripts/publish-ghpages.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -o errexit -o nounset
55
####################################
66
# repo specific variables
77
####################################
8-
TRIGGER_REPO_SLUG="patternfly/angular-patternfly"
8+
TRIGGER_REPO_SLUG="patternfly/patternfly-atomic"
99
TRIGGER_REPO_BRANCH="master"
1010
####################################
1111
####################################
@@ -14,6 +14,7 @@ SCRIPT=`basename $0`
1414
ACTION="Manual"
1515
REPO_NAME="origin"
1616
SOURCE_BRANCH=`git rev-parse --abbrev-ref HEAD`
17+
QUIET=false
1718

1819
RED='\033[0;31m'
1920
YELLOW='\033[1;33m'
@@ -28,6 +29,9 @@ echoHeader () {
2829
}
2930

3031
confirm () {
32+
if $QUIET; then
33+
true
34+
else
3135
# call with a prompt string or use a default
3236
QUESTION="${1:-Are you sure? [y/N]} "
3337
echo -e -n $QUESTION
@@ -40,6 +44,7 @@ confirm () {
4044
false
4145
;;
4246
esac
47+
fi
4348
}
4449

4550
setUserInfo () {
@@ -198,7 +203,9 @@ parseOpts() {
198203
while getopts htr:b: OPT "$@"; do
199204
case $OPT in
200205
h) usage; exit 0;;
201-
t) ACTION="Travis";;
206+
t) ACTION="Travis"
207+
QUIET=true
208+
;;
202209
r) REPO_NAME=$OPTARG;;
203210
b) SOURCE_BRANCH=$OPTARG;;
204211
esac

0 commit comments

Comments
 (0)