Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Williams2013-05-23 12:00:56 +0000
committerDavid Williams2013-05-23 12:00:56 +0000
commit0bd810149652bd18ea8a73ef04725ce8912bae00 (patch)
tree9c8ba26e6753282c80c7ff95d6a968687ea6f6a2 /production/git-submodule-checkout.sh
parenta47de7c69e8e755e00a58ee34b73c0c51f31ac05 (diff)
downloadeclipse.platform.releng.aggregator-0bd810149652bd18ea8a73ef04725ce8912bae00.tar.gz
eclipse.platform.releng.aggregator-0bd810149652bd18ea8a73ef04725ce8912bae00.tar.xz
eclipse.platform.releng.aggregator-0bd810149652bd18ea8a73ef04725ce8912bae00.zip
Bug 404443 - Replace map file entries link with a link to the aggregator
commit, and enables better testing of Bug 408632 - Builder should handle tags/branches/commented out entries in repositories.txt file
Diffstat (limited to 'production/git-submodule-checkout.sh')
-rw-r--r--production/git-submodule-checkout.sh40
1 files changed, 38 insertions, 2 deletions
diff --git a/production/git-submodule-checkout.sh b/production/git-submodule-checkout.sh
index 022472b9..9950bd6a 100644
--- a/production/git-submodule-checkout.sh
+++ b/production/git-submodule-checkout.sh
@@ -1,6 +1,12 @@
#!/usr/bin/env bash
#
+# TODO: this script is called with repoScript=$( echo $SCRIPT_PATH/git-submodule-checkout.sh )
+# so any echo messages and exit codes are being "eaten" by the eval clause.
+# But, not sure it needs to be evaled for repoScript?
+# If needed, will need to write to "buildFailed_ type of file, then check for that file
+# after its called. But, for now, will write to TRACE_OUTPUT
+
REPOSITORIES_TXT="$1"; shift
name="$1"; shift
@@ -11,24 +17,54 @@ if [[ -n "$BUILD_TYPE" && "$BUILD_TYPE" == "N" ]]
then
if [[ "master" != $VAL ]]
then
- echo "INFO: Branch forced to 'master', instead of '$VAL', since doing N-Build"
+ echo "INFO: Branch forced to 'master', instead of '$VAL', since doing N-Build" >> ${TRACE_OUTPUT}
VAL="master"
fi
fi
if [ -z "$VAL" ]; then
- echo No tag or branch specified for $name
+ echo "WARNING: No tag or branch specified for $name in repositories.txt" >> ${TRACE_OUTPUT}
+ echo " Has a submodule been added? Perhaps just commented out?" >> ${TRACE_OUTPUT}
+ echo " Will use what ever was last added to aggregator" >> ${TRACE_OUTPUT}
+ # is this ever an error?
exit
fi
+# always fetch before checkout, to be sure new
+# branches are in local repo (in case we are switching
+# to a new branch or tag).
git fetch
+RC=$?
+if [[ $RC != 0 ]]
+then
+ echo "ERROR: Return code of $RC during fetch of $name repository" >> ${TRACE_OUTPUT}
+ exit $RC
+fi
if [ -z "$(git tag -l $VAL)" ]; then
echo Updating branch $VAL
git checkout $VAL
+ RC=$?
+ if [[ $RC != 0 ]]
+ then
+ echo "ERROR: Return code of $RC during checkout of $VAL for repository $name" >> ${TRACE_OUTPUT}
+ exit $RC
+ fi
git pull
+ RC=$?
+ if [[ $RC != 0 ]]
+ then
+ echo "ERROR: Return code of $RC during pull for repository $name" >> ${TRACE_OUTPUT}
+ exit $RC
+ fi
else
echo Updating to tag $VAL
git checkout $VAL
+ RC=$?
+ if [[ $RC != 0 ]]
+ then
+ echo "ERROR: Return code of $RC during checkout of $VAL for repository $name" >> ${TRACE_OUTPUT}
+ exit $RC
+ fi
fi

Back to the top