Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2017-11-30 07:13:26 -0500
committerSravan Kumar Lakkimsetti2017-11-30 07:13:39 -0500
commitd6b2de0c35a381c84594e069baa29fe19a98f098 (patch)
tree7c4b518632301fe461d8611b81c58f597b9d6e24
parent29815c215cbcddce2039d5c786a1c23a651d1192 (diff)
downloadeclipse.platform.releng.aggregator-d6b2de0c35a381c84594e069baa29fe19a98f098.tar.gz
eclipse.platform.releng.aggregator-d6b2de0c35a381c84594e069baa29fe19a98f098.tar.xz
eclipse.platform.releng.aggregator-d6b2de0c35a381c84594e069baa29fe19a98f098.zip
Bug 520206 - Don't start a build if there are commits in SWT after last
tag Change-Id: I55e699c2252c623a4b5b6c1b5d8c1ab9463886bd Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
-rwxr-xr-xproduction/check-swt-buildinput.sh36
-rwxr-xr-xproduction/master-build.sh3
2 files changed, 39 insertions, 0 deletions
diff --git a/production/check-swt-buildinput.sh b/production/check-swt-buildinput.sh
new file mode 100755
index 00000000..27524722
--- /dev/null
+++ b/production/check-swt-buildinput.sh
@@ -0,0 +1,36 @@
+#!/bin/bash -x
+#*******************************************************************************
+# Copyright (c) 2017 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Sravan Lakkimsetti - initial API and implementation
+#*******************************************************************************
+
+if [ $# -ne 1 ]; then
+ echo USAGE: $0 env_file
+ exit 1
+fi
+
+if [ ! -r "$1" ]; then
+ echo "$1" cannot be read
+ echo USAGE: $0 env_file
+ exit 1
+fi
+
+source "$1"
+
+pushd $BUILD_ROOT/gitCache/eclipse.platform.releng.aggregator/eclipse.platform.swt
+commit=$(git log --pretty=oneline -1|cut -d' ' -f2-)
+popd
+
+if [[ $commit == v[0-9][0-9][0-9][0-9] ]]; then
+ echo "SWT build input succesful"
+ exit 0
+else
+ echo "SWT build input failed"
+ exit 1
+fi
diff --git a/production/master-build.sh b/production/master-build.sh
index 4e1f5d67..920c6e2b 100755
--- a/production/master-build.sh
+++ b/production/master-build.sh
@@ -313,6 +313,9 @@ else
$SCRIPT_PATH/tag-build-input.sh $BUILD_ENV_FILE 2>&1 | tee $TAG_BUILD_INPUT_LOG
checkForErrorExit $? "Error occurred during tag of build input"
+ $SCRIPT_PATH/check-swt-buildinput.sh $BUILD_ENV_FILE 2>&1 | tee $logsDirectory/check-swt-buildinput_output.txt
+ checkForErrorExit $? "Error occurred during verification of swt build input"
+
# At this point, everything should be checked out, updated, and tagged
# (tagged unless N build or test build)
# So is a good point to capture listing of build input to directory.txt file.

Back to the top