Remove '[' in the execution of git diff for .bazelversion
The execution of commands inside an if statement does not
require any squared brackets.
Change-Id: Ib576c2d2cefe6e447680c388e3688f1dbf6b4609
diff --git a/jenkins/gerrit-bazel-build.sh b/jenkins/gerrit-bazel-build.sh
index b9c0eea..39049e4 100644
--- a/jenkins/gerrit-bazel-build.sh
+++ b/jenkins/gerrit-bazel-build.sh
@@ -4,7 +4,7 @@
cd gerrit
-if [git show --diff-filter=AM --name-only --pretty="" HEAD | grep -q .bazelversion]
+if git show --diff-filter=AM --name-only --pretty="" HEAD | grep -q .bazelversion
then
export BAZEL_OPTS=""
fi
diff --git a/jenkins/gerrit-bazel-cleancache.sh b/jenkins/gerrit-bazel-cleancache.sh
index 59d8fb6..0f9f651 100644
--- a/jenkins/gerrit-bazel-cleancache.sh
+++ b/jenkins/gerrit-bazel-cleancache.sh
@@ -1,6 +1,6 @@
#!/bin/bash -e
-if [git show --diff-filter=AM --name-only --pretty="" HEAD | grep -q .bazelversion]
+if git show --diff-filter=AM --name-only --pretty="" HEAD | grep -q .bazelversion
then
echo "Bazel version upgrade to $(cat .bazelversion) detected => cleaning up all local Bazel caches"
rm -Rf ~/.gerritcodereview ~/.cache
diff --git a/jenkins/gerrit-bazel-test.sh b/jenkins/gerrit-bazel-test.sh
index 4c289f9..8baaac1 100755
--- a/jenkins/gerrit-bazel-test.sh
+++ b/jenkins/gerrit-bazel-test.sh
@@ -4,7 +4,7 @@
cd gerrit
-if [git show --diff-filter=AM --name-only --pretty="" HEAD | grep -q .bazelversion]
+if git show --diff-filter=AM --name-only --pretty="" HEAD | grep -q .bazelversion
then
export BAZEL_OPTS=""
fi
diff --git a/jenkins/gerrit-codestyle-polygerrit-lint.sh b/jenkins/gerrit-codestyle-polygerrit-lint.sh
index 377682e..7ebfa07 100644
--- a/jenkins/gerrit-codestyle-polygerrit-lint.sh
+++ b/jenkins/gerrit-codestyle-polygerrit-lint.sh
@@ -2,7 +2,7 @@
. set-java.sh 8
-if [git show --diff-filter=AM --name-only --pretty="" HEAD | grep -q .bazelversion]
+if git show --diff-filter=AM --name-only --pretty="" HEAD | grep -q .bazelversion
then
export BAZEL_OPTS=""
fi