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

Diff of /auto_build_latest_upstream.sh

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

--- auto_build_latest_upstream.sh	2010/09/10 13:19:26	134
+++ auto_build_latest_upstream.sh	2010/09/10 15:59:23	143
@@ -8,6 +8,8 @@
         . ./auto_build_defs.sh
 fi
 
+export OVERRIDE_TMP_BUILD_PATH_SAVE="$OVERRIDE_TMP_BUILD_PATH"
+
 export DISABLE_AUTO_BRANCH="0"
 export DISABLE_PREBUILD="0"
 export DISABLE_CLEANUP="0"
@@ -42,12 +44,11 @@
 
 # call auto prebuild
 if [ "$DISABLE_PREBUILD" == "0" ] ; then
-	if [ "$AUTO_PREBUILD_DONE" == "" ] ; then
-		"$downstream_export_location/auto_prebuild_latest_upstream.sh"
-		if [ "$AUTO_PREBUILD_DONE" != "true" ] ; then
-			echo "PREBUILD FAILED..."
-			exit 1
-		fi	
+	export PREBUILD_SUCCESS="0"	
+	"$downstream_export_location/auto_prebuild_latest_upstream.sh" "$OVERRIDE_TMP_BUILD_PATH_SAVE" && PREBUILD_SUCCESS="1" || PREBUILD_SUCCESS="0"
+	if [ "$PREBUILD_SUCCESS" == "0" ] ; then
+		echo "PREBUILD FAILED!"
+		exit 1
 	fi
 else
 	echo "PREBUILD HAS BEEN DISABLED ... to enable do not use --no-prebuild"	
@@ -79,6 +80,27 @@
 	echo "PERFORMING POSTBUILD:"
 	echo -e "\\tCOPYING $PCSX2_BUILD_TMP/bin/* $downstream_export_location/trunk/bin/ ... {}"
 	cp -Rfv "$PCSX2_BUILD_TMP/bin"/* "$downstream_export_location/trunk/bin/" >/dev/null 2>/dev/null
+	
+	# commit newly built files in trunk
+	cd "$downstream_export_location/trunk/bin/"
+	# add the newly built files to svn
+		find  -not -path "*.svn*" \
+		        -not -name "*.bsc" \
+		        -not -name "*.exp" \
+		        -not -name "*.ilk" \
+		        -not -name "*.lib" -exec bash -c '
+		#echo "{}"
+		if [ "{}" != "." ] ; then
+		        export svn_file=`echo "{}" | sed s/".\/"//`
+		        export svn_need_to_add=`svn status | grep "$svn_file"`
+		        if [ "$svn_need_to_add" != "" ] ; then
+		                svn add "{}" >/dev/null 2>/dev/null
+		        fi
+		fi
+	' \;
+	svn commit -m "Committing Build: $PCSX2_VERSION" --non-interactive --trust-server-cert >/dev/null 2>/dev/null
+                                                                                	
+	
 	echo "POSTBUILD COMPLETED..."
 	# END POST BUILD
 
@@ -98,6 +120,7 @@
 	echo "AUTOBUILD COMPLETE..."
 	# perform auto tagging
 	if [ "$DISABLE_AUTO_BRANCH" == "0" ] ; then
+		cd "$downstream_export_location"
 		# Always force auto branch update after building
 		"$downstream_export_location/auto_branch_latest_upstream.sh" --force-update
 	else

 

  ViewVC Help
Powered by ViewVC 1.1.22