Update mvn snapshot dependencies in "clean" checkouts
buildall.sh saves the cdh/cdp version into .cdh/.cdp, and updates
the dependencies if this doesn't match the version from config.
This lead to updating the dependencies when switching to a different
checkout in the same directory, but didn't do this in a fresh checkout,
which could lead to build issues when the .m2 cache was dirty.
Note that this doesn't protect from switching between Impala directories
with different cdh/cdp versions.
Change-Id: I8bbde17e7c97466391aa20ac3d59c6943e7f7256
Reviewed-on: http://gerrit.cloudera.org:8080/14854
Reviewed-by: Zoltan Borok-Nagy <boroknagyz@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Laszlo Gaal <laszlo.gaal@cloudera.com>
diff --git a/buildall.sh b/buildall.sh
index 23ea8f9..ab7d415 100755
--- a/buildall.sh
+++ b/buildall.sh
@@ -547,11 +547,10 @@
# local cache.
CDH_FILE="${IMPALA_HOME}/.cdh"
CDP_FILE="${IMPALA_HOME}/.cdp"
-if [[ -f ${CDH_FILE} && -f ${CDP_FILE} ]]; then
- if [[ $(cat ${CDH_FILE}) != ${CDH_BUILD_NUMBER} || \
- $(cat ${CDP_FILE}) != ${CDP_BUILD_NUMBER} ]]; then
- export IMPALA_MAVEN_OPTIONS="${IMPALA_MAVEN_OPTIONS} -U"
- fi
+if [[ ! -f ${CDH_FILE} || ! -f ${CDP_FILE} || \
+ $(cat ${CDH_FILE}) != ${CDH_BUILD_NUMBER} || \
+ $(cat ${CDP_FILE}) != ${CDP_BUILD_NUMBER} ]]; then
+ export IMPALA_MAVEN_OPTIONS="${IMPALA_MAVEN_OPTIONS} -U"
fi
echo "${CDH_BUILD_NUMBER}" > ${CDH_FILE}
echo "${CDP_BUILD_NUMBER}" > ${CDP_FILE}