[jbosstools-commits] JBoss Tools SVN: r23372 - trunk/build.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Jul 12 14:24:31 EDT 2010


Author: nickboldt
Date: 2010-07-12 14:24:31 -0400 (Mon, 12 Jul 2010)
New Revision: 23372

Modified:
   trunk/build/publish.sh
Log:
parameterize zip suffix so a RELEASE can be named uniquely instead of self-replacing SNAPSHOTs; support optional sources zip

Modified: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh	2010-07-12 12:25:33 UTC (rev 23371)
+++ trunk/build/publish.sh	2010-07-12 18:24:31 UTC (rev 23372)
@@ -1,11 +1,21 @@
 #!/bin/bash
 # Hudson script used to publish Tycho-built p2 update sites
-
 # NOTE: sources MUST be checked out into ${WORKSPACE}/sources 
 
-# define target zip filename for inclusion in uberbuilder's bucky aggregator
-SNAPNAME=${JOB_NAME}-Update-SNAPSHOT.zip
+# releases get named differently than snapshots
+if [[ ${RELEASE} == "Yes" ]]; then
+	ZIPSUFFIX="${BUILD_ID}-H${BUILD_NUMBER}"
+else
+	ZIPSUFFIX="SNAPSHOT"
+fi
 
+# define target update zip filename
+SNAPNAME="${JOB_NAME}-Update-${ZIPSUFFIX}.zip"
+# define target sources zip filename
+SRCSNAME="${JOB_NAME}-Sources-${ZIPSUFFIX}.zip"
+# define suffix to use for additional update sites
+SUFFNAME="-Update-${ZIPSUFFIX}.zip"
+
 if [[ $DESTINATION == "" ]]; then DESTINATION="tools at filemgmt.jboss.org:/downloads_htdocs/tools/builds/nightly/3.2.helios"; fi
 
 # cleanup from last time
@@ -51,7 +61,7 @@
 		mkdir -p ${WORKSPACE}/site/${JOB_NAME}/$y
 		unzip -u -o -q -d ${WORKSPACE}/site/${JOB_NAME}/$y $z
 		# copy into workspace for access by bucky aggregator (same name every time)
-		rsync -aq $z ${WORKSPACE}/site/${JOB_NAME}/${y}-Update-SNAPSHOT.zip
+		rsync -aq $z ${WORKSPACE}/site/${JOB_NAME}/${y}${SUFFNAME}
 	fi
 done
 
@@ -64,6 +74,11 @@
 	done
 fi
 
+# get sources zip
+if [[ ! -f ${WORKSPACE}/sources/build/sources/target/sources.zip ]]; then
+	rsync -aq ${WORKSPACE}/sources/build/sources/target/sources.zip ${WORKSPACE}/site/${JOB_NAME}/${SRCSNAME}
+fi
+
 # get full build log and filter out Maven test failures
 bl=${WORKSPACE}/site/${JOB_NAME}/BUILDLOG.txt
 wget -q http://hudson.qa.jboss.com/hudson/job/${JOB_NAME}/${BUILD_NUMBER}/consoleText -O ${bl}
@@ -94,11 +109,12 @@
 # publish to download.jboss.org, unless errors found - avoid destroying last-good update site
 if [[ $ec == "0" ]] && [[ $fc == "0" ]]; then
 date
+	# publish update site dir
 	if [[ -d ${WORKSPACE}/site/${JOB_NAME} ]]; then
 		rsync -arzq --delete ${WORKSPACE}/site/${JOB_NAME} $DESTINATION/
 	fi
+	# publish update site zip
 	if [[ -f ${WORKSPACE}/site/${SNAPNAME} ]]; then
-		# publish snapshot zip
 		rsync -arzq --delete ${WORKSPACE}/site/${SNAPNAME} $DESTINATION/
 	fi
 fi



More information about the jbosstools-commits mailing list