[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[stp-commits] r3629 - org.eclipse.stp.sca/trunk/update-site

Author: vzurczak
Date: 2011-05-20 04:56:38 -0400 (Fri, 20 May 2011)
New Revision: 3629

Modified:
   org.eclipse.stp.sca/trunk/update-site/pom.xml
Log:
Change the way builds are published

Modified: org.eclipse.stp.sca/trunk/update-site/pom.xml
===================================================================
--- org.eclipse.stp.sca/trunk/update-site/pom.xml	2011-05-20 07:34:33 UTC (rev 3628)
+++ org.eclipse.stp.sca/trunk/update-site/pom.xml	2011-05-20 08:56:38 UTC (rev 3629)
@@ -13,8 +13,9 @@
 	
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<target.directory>/shared/stp/committers/sca-tools</target.directory>
+		<publish.directory>/shared/stp/committers/sca-tools</publish.directory>
 		<publish.update.site>false</publish.update.site>
+		<promote.directory>indigo</promote.directory>
 	</properties>
 	
 	<groupId>org.eclipse.soa.sca</groupId>
@@ -62,6 +63,14 @@
 								
 								<configuration>
 									<target>
+									
+										<!-- Clean the publish directory -->
+										<delete>
+											<fileset dir="${publish.directory}">
+												<exclude name="${promote.directory}" />
+											</fileset>
+										</delete>
+									
 										<!-- Prepare the name of the archive -->
 										<!-- Thanks ANT and Maven for making things simple! -->
 										<!-- There is no solution in ANT and Maven to manipulate text.
@@ -87,8 +96,8 @@
 		              									
 										<!-- Rename the update site and unzip it -->
 										<move file="target/site_assembly.zip" tofile="target/site_assembly_${buildId}.zip"/> 
-										<mkdir dir="${target.directory}/${buildId}" />
-										<unzip src="target/site_assembly_${buildId}.zip" dest="${target.directory}/${buildId}" />
+										<mkdir dir="${publish.directory}/${buildId}" />
+										<unzip src="target/site_assembly_${buildId}.zip" dest="${publish.directory}/${buildId}" />
 									</target>
 								</configuration>
 								
@@ -164,12 +173,46 @@
 								
 								<configuration>
 									<target>
+									
+										<!-- Clean up the signing directory -->
 										<delete includeemptydirs="true">
 											<fileset dir="/home/data/httpd/download-staging.priv/stp/">
 												<exclude name="signed" />
 												<exclude name="signed_folder" />
 											</fileset>
 										</delete>
+										
+										<!-- Prepare the publication -->
+										<mkdir dir="${publish.directory}/${promote.directory}" />
+										<delete>
+											<fileset dir="${publish.directory}/${promote.directory}">
+												<include name="*" />
+											</fileset>
+										</delete>
+										
+										<!-- Prepare the build ID -->
+										<tstamp>
+											<format property="TODAY" pattern="yyyyMMddHHmmss" />
+										</tstamp>
+										
+										<!-- Go through a temporary file to replace a property part. -->
+										<tempfile property="temp.file" />
+										<echo message="${project.version}" file="${temp.file}"/>
+										<loadfile srcfile="${temp.file}" property="buildId">
+		    								<filterchain>
+		        								<replaceregex pattern="-SNAPSHOT" replace=".${TODAY}" />
+		    								</filterchain>
+										</loadfile>
+										<delete file="${temp.file}" />
+										
+										<!-- Zip the checked-sum directory (updated MD5) -->
+										<zip destfile="${project.build.directory}/SCA_Tools_${buildId}.zip"
+											 basedir="${project.build.directory}/checksumFix" />
+																				
+										<!-- Move the update site -->
+										<move file="${project.build.directory}/SCA_Tools_${buildId}.zip" 
+											  tofile="${publish.directory}/${promote.directory}/SCA_Tools_${buildId}.zip"/> 
+										
 									</target>
 								</configuration>