/[pcsx2_0.9.7]/auto_branch_latest_upstream.sh
ViewVC logotype

Diff of /auto_branch_latest_upstream.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- auto_branch_latest_upstream.sh	2010/09/09 20:01:13	104
+++ auto_branch_latest_upstream.sh	2010/09/09 20:10:48	105
@@ -1,6 +1,7 @@
 #!/bin/bash
 . ./auto_defs.sh
 
+export BRANCH_CREATE_SUCCESS="0"
 
 export OVERRIDE_UPDATE_NEEDED_CHECK="0"
 if [ "$1" == "--force-update" ] ; then
@@ -37,31 +38,37 @@
 rm -Rf "$BRANCH_LOCATION/$BRANCH_NAME"
 #remove the latest branch from the base repository
 #svn delete "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert
-svn delete "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert >/dev/null 2>/dev/null
+svn delete "$BRANCH_LOCATION/$BRANCH_NAME" --non-interactive --trust-server-cert >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="0" || BRANCH_CREATE_SUCCESS="1"
 
 #update the working copy
 #svn commit "$BRANCH_LOCATION" --non-interactive --trust-server-cert --depth immediates -m "remove latest branch for re-branching"
-svn commit "$BRANCH_LOCATION" --non-interactive --trust-server-cert --depth immediates -m "remove latest branch for re-branching" >/dev/null 2>/dev/null
+svn commit "$BRANCH_LOCATION" --non-interactive --trust-server-cert --depth immediates -m "remove latest branch for re-branching" >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="0" || BRANCH_CREATE_SUCCESS="1"
 
 echo
 echo -n "EXPORTING: $downstream_export_location/trunk to $BRANCH_LOCATION/$BRANCH_NAME ... "
 #svn export --force $downstream_export_location/trunk "$BRANCH_LOCATION/$BRANCH_NAME"
-svn export --force $downstream_export_location/trunk "$BRANCH_LOCATION/$BRANCH_NAME" 2>/dev/null
+svn export --force $downstream_export_location/trunk "$BRANCH_LOCATION/$BRANCH_NAME" 2>/dev/null && BRANCH_CREATE_SUCCESS="0" || BRANCH_CREATE_SUCCESS="1"
 
 
 # add new branch to svn
 echo
 echo -n "Adding latest branch to svn ... "
 #svn add "$BRANCH_LOCATION/$BRANCH_NAME"
-svn add "$BRANCH_LOCATION/$BRANCH_NAME" >/dev/null 2>/dev/null
+svn add "$BRANCH_LOCATION/$BRANCH_NAME" >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="0" || BRANCH_CREATE_SUCCESS="1"
 echo "Done."
 
 cd "$BRANCH_LOCATION/$BRANCH_NAME"
 # commit the newly created branch
 #svn commit -m "$BRANCH_COMMIT_MESSAGE" "$BRANCH_LOCATION" --non-interactive --trust-server-cert
-svn commit -m "$BRANCH_COMMIT_MESSAGE" "$BRANCH_LOCATION" --non-interactive --trust-server-cert >/dev/null 2>/dev/null
+svn commit -m "$BRANCH_COMMIT_MESSAGE" "$BRANCH_LOCATION" --non-interactive --trust-server-cert >/dev/null 2>/dev/null && BRANCH_CREATE_SUCCESS="0" || BRANCH_CREATE_SUCCESS="1"
 
 
 # call auto_build_latest_upstream.sh
 #"$downstream_export_location/auto_import_patches.sh"
 #"$downstream_export_location/auto_build.sh"
+if [ "$BRANCH_CREATE_SUCCESS" == "1" ] ; then
+	"$downstream_export_location/auto_tag_latest_upstream.sh"
+else
+	echo "AUTO BRANCH FAILED ... AUTO TAGGING NOT PERFORMED."
+	exit 1
+fi

 

  ViewVC Help
Powered by ViewVC 1.1.22