[jbosstools-commits] JBoss Tools SVN: r22744 - branches/3.2.helios/build.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Jun 10 23:57:36 EDT 2010


Author: nickboldt
Date: 2010-06-10 23:57:35 -0400 (Thu, 10 Jun 2010)
New Revision: 22744

Modified:
   branches/3.2.helios/build/build.xml
   branches/3.2.helios/build/publish.sh
Log:
merge from trunk

Modified: branches/3.2.helios/build/build.xml
===================================================================
--- branches/3.2.helios/build/build.xml	2010-06-11 03:56:08 UTC (rev 22743)
+++ branches/3.2.helios/build/build.xml	2010-06-11 03:57:35 UTC (rev 22744)
@@ -313,7 +313,7 @@
 						<if>
 							<istrue value="${svnant.enabled}" />
 							<then>
-								<!-- remove generated site/ folder -->
+								<!-- remove generated site/ folder?
 								<if>
 									<not>
 										<equals arg1="@{component}" arg2="." />
@@ -324,7 +324,7 @@
 										        quiet="true"
 										/>
 									</then>
-								</if>
+								-->
 								<!-- 
 								<svn javahl="false" svnkit="true" failonerror="false">
 									<revert recurse="${svn.recurse}" dir="@{component}" />
@@ -660,7 +660,7 @@
 						<ant antfile="${WORKINGDIR}/@{COMPONENT}/build.xml">
 							<property name="COMPONENT" value="@{COMPONENT}" />
 							<property name="basedir" value="${WORKINGDIR}/@{COMPONENT}" />
-							<property name="build.xml" value="${ant.file}"/>
+							<property name="build.xml" value="${ant.file}" />
 						</ant>
 					</then>
 				</if>
@@ -700,9 +700,18 @@
 						</not>
 					</and>
 					<then>
-						<antcall target="create.update.site">
-							<param name="COMPONENT" value="@{COMPONENT}" />
-						</antcall>
+						<!-- only do this if the component's aggregate pom doesn't reference the site/ folder, and therefore hasn't already build it -->
+						<loadfile property="component.pom.xml" srcfile="${WORKINGDIR}/@{COMPONENT}/pom.xml" />
+						<if>
+							<not>
+								<contains string="${component.pom.xml}" substring="&lt;module&gt;site&lt;/module&gt;" />
+							</not>
+							<then>
+								<antcall target="create.update.site">
+									<param name="COMPONENT" value="@{COMPONENT}" />
+								</antcall>
+							</then>
+						</if>
 					</then>
 				</if>
 			</sequential>

Modified: branches/3.2.helios/build/publish.sh
===================================================================
--- branches/3.2.helios/build/publish.sh	2010-06-11 03:56:08 UTC (rev 22743)
+++ branches/3.2.helios/build/publish.sh	2010-06-11 03:57:35 UTC (rev 22744)
@@ -1,17 +1,20 @@
 #!/bin/bash
 # Hudson script used to publish Tycho-built p2 update sites
 
-# define target zip filename date and hudson build id marked for clarity and publication
-ZIPNAME=${JOB_NAME}-Update-H${BUILD_NUMBER}-${BUILD_ID}.zip
-
 # define target zip filename for inclusion in uberbuilder's bucky aggregator
 SNAPNAME=${JOB_NAME}-Update-SNAPSHOT.zip
 
 rm -fr ${WORKSPACE}/site; mkdir -p ${WORKSPACE}/site/${JOB_NAME}
 if [[ -f ${WORKSPACE}/sources/site/target/site.zip ]]; then 
-	# copy into workspace for archiving
-	rsync -aq ${WORKSPACE}/sources/site/target/site.zip ${WORKSPACE}/site/${JOB_NAME}/${ZIPNAME}
-	# copy into workspace for access by bucky aggregator
+	# note the job name, build number, and build ID of the latest snapshot zip
+	echo "JOB_NAME = ${JOB_NAME}" > ${WORKSPACE}/site/${JOB_NAME}/JOB_NAME.txt
+	echo "BUILD_NUMBER = ${BUILD_NUMBER}" > ${WORKSPACE}/site/${JOB_NAME}/BUILD_NUMBER.txt
+	echo "BUILD_ID = ${BUILD_ID}" > ${WORKSPACE}/site/${JOB_NAME}/BUILD_ID.txt
+	
+	# unzip into workspace for publishing as unpacked site
+	unzip -q ${WORKSPACE}/sources/site/target/site.zip -d ${WORKSPACE}/site/${JOB_NAME}/
+	
+	# copy into workspace for access by bucky aggregator (same name every time)
 	rsync -aq ${WORKSPACE}/sources/site/target/site.zip ${WORKSPACE}/site/${SNAPNAME}
 fi
 
@@ -26,5 +29,6 @@
 	rsync -arzq --delete ${WORKSPACE}/site/${JOB_NAME} $DESTINATION/builds/nightly/3.2.helios/
 fi
 if [[ -f ${WORKSPACE}/site/${SNAPNAME} ]]; then
+	# publish snapshot zip
 	rsync -arzq --delete ${WORKSPACE}/site/${SNAPNAME} $DESTINATION/builds/nightly/3.2.helios/
 fi
\ No newline at end of file



More information about the jbosstools-commits mailing list