Skip to content

Commit f3a4399

Browse files
sonatype-lift changes
addressed change requests
1 parent 4d728ba commit f3a4399

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

functions.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ function show_help() {
1313
echo -e "\e[39m"
1414
echo "##########################################"
1515
echo ""
16-
cat << EOF
16+
cat << EOF
1717
18-
Usage of CobiGen build & deploy script
18+
Usage of CobiGen build & deploy script
1919
2020
-b | --batch Batch mode to prevent from issues like https://stackoverflow.com/a/66801171
2121
-c | --coverage Create code coverage report
@@ -43,7 +43,7 @@ PARALLELIZED=""
4343
DEBUG=""
4444
DRYRUN=false
4545
NO_CLEAN=false
46-
GPG_KEYNAME=""
46+
GPG_KEYNAME=""
4747
COVERAGE=""
4848
COV_REPORT=false
4949

@@ -89,8 +89,8 @@ do
8989
;;
9090
-C|--components)
9191
shift
92-
IFS=',' read -r -a COMPONENTS <<< $1
93-
COMPONENTS_TO_BUILD+=(${COMPONENTS[@]})
92+
IFS=',' read -r -a COMPONENTS <<< "$1"
93+
COMPONENTS_TO_BUILD+=(${COMPONENTS[*]})
9494
echo -e "\e[92m > Build components $( IFS=$','; echo "${COMPONENTS[*]}" )\e[39m"
9595
;;
9696
-d|--dirty)
@@ -99,7 +99,7 @@ do
9999
;;
100100
-g|--gpgkey)
101101
shift
102-
GPG_KEYNAME=$1
102+
GPG_KEYNAME="$1"
103103
echo -e "\e[92m > GPG Key set to $GPG_KEYNAME\e[39m"
104104
;;
105105
-h|--help)
@@ -114,11 +114,11 @@ do
114114
COV_REPORT=true
115115
echo -e "\e[92m > Create coverage report\e[39m"
116116
;;
117-
-s|--repo-settings)
117+
-s|--repo-settings)
118118
MVN_SETTINGS="-s .mvn/ci-settings.xml"
119119
echo -e "\e[92m > Executing maven with settings from .mvn/settings.xml \e[39m"
120120
;;
121-
-t|--test)
121+
-t|--test)
122122
ENABLED_TEST=""
123123
echo -e "\e[92m > With test execution\e[39m"
124124
;;
@@ -145,12 +145,12 @@ done
145145
if [[ ${#COMPONENTS_TO_BUILD[@]} = 0 ]]
146146
then
147147
echo -e "\e[92m > Build all components\e[39m"
148-
COMPONENTS_TO_BUILD=${ALL_COMPONENTS[@]}
148+
COMPONENTS_TO_BUILD=${ALL_COMPONENTS[*]}
149149
fi
150150

151151
## VALIDATE
152152

153-
if [[ $(basename $0) != "build.sh" ]]
153+
if [[ "$(basename "$0")" != "build.sh" ]]
154154
then
155155
echo -e "\e[91m !ERR! Cannot sign artifacts without passing a gpg key for signing. Please pass gpgkey=<your key> as a parameter or GPG_KEY as secret.\e[39m"
156156
exit 1
@@ -202,7 +202,7 @@ function doRunCommand() {
202202
# $1: yes/no question
203203
function doAskQuestion() {
204204
local question="${1}"
205-
205+
206206
local answer
207207
while true
208208
do
@@ -253,6 +253,6 @@ function pauseUntilKeyPressed() {
253253
if [[ "$SILENT" = false ]]
254254
then
255255
echo ""
256-
read -p "Press any key to resume with cleanup after reviewing the deployments ..."
256+
read -p "Press any key to resume with cleanup after reviewing the deployments ..."
257257
fi
258258
}

0 commit comments

Comments
 (0)