Fix unescaped * in if-statement 61/6661/2 v0.9.1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 2 Oct 2017 21:34:58 +0000 (17:34 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 2 Oct 2017 21:39:42 +0000 (17:39 -0400)
Change-Id: I8e45a1adc13f4da0e7386371678f6364670f5c38
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
.jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job
.jjb-test/expected-xml/github-ciman-jjb-deploy-job
shell/jjb-deploy-job.sh

index fa7cca5..80597b9 100644 (file)
@@ -249,7 +249,7 @@ COMMENT=&quot;${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}&quot;
 JOB_NAME=$(echo &quot;$COMMENT&quot; | grep jjb-deploy | awk '{print $2}')
 
 # Strip all * characters to prevent pushing all jobs to Jenkins
-if [ -z &quot;${JOB_NAME//*/}&quot; ]; then
+if [ -z &quot;${JOB_NAME//\*/}&quot; ]; then
     echo &quot;ERROR: JOB_NAME cannot be empty or '*'.&quot;
     exit 1
 fi
index a214b2d..b364dde 100644 (file)
@@ -217,7 +217,7 @@ COMMENT=&quot;${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}&quot;
 JOB_NAME=$(echo &quot;$COMMENT&quot; | grep jjb-deploy | awk '{print $2}')
 
 # Strip all * characters to prevent pushing all jobs to Jenkins
-if [ -z &quot;${JOB_NAME//*/}&quot; ]; then
+if [ -z &quot;${JOB_NAME//\*/}&quot; ]; then
     echo &quot;ERROR: JOB_NAME cannot be empty or '*'.&quot;
     exit 1
 fi
index c7b8d8d..3db9506 100644 (file)
@@ -27,7 +27,7 @@ COMMENT="${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}"
 JOB_NAME=$(echo "$COMMENT" | grep jjb-deploy | awk '{print $2}')
 
 # Strip all * characters to prevent pushing all jobs to Jenkins
-if [ -z "${JOB_NAME//*/}" ]; then
+if [ -z "${JOB_NAME//\*/}" ]; then
     echo "ERROR: JOB_NAME cannot be empty or '*'."
     exit 1
 fi