jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1416316 - /jmeter/trunk/build.xml
Date Mon, 03 Dec 2012 00:03:35 GMT
Author: sebb
Date: Mon Dec  3 00:03:35 2012
New Revision: 1416316

URL: http://svn.apache.org/viewvc?rev=1416316&view=rev
Log:
Add release_delete target for tidying up old releases

Modified:
    jmeter/trunk/build.xml

Modified: jmeter/trunk/build.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/build.xml?rev=1416316&r1=1416315&r2=1416316&view=diff
==============================================================================
--- jmeter/trunk/build.xml (original)
+++ jmeter/trunk/build.xml Mon Dec  3 00:03:35 2012
@@ -1583,6 +1583,14 @@ run JMeter unless all the JMeter jars ar
       outstream.println(source); // source
       outstream.println();
     }
+    void delete(source, targetDir) {
+      self.log("Will delete " + source + " from " + targetDir);
+      outstream.println("rm");
+      outstream.print("release/jmeter/");
+      outstream.print(targetDir);
+      outstream.println(source); // source
+      outstream.println();
+    }
     void processFiles(basename, targetDir) {
       // combine all the extensions in one list
       extensions = new String[]{".zip", ".zip.asc", ".zip.md5", ".zip.sha", ".tgz", ".tgz.asc",
".tgz.md5", ".tgz.sha"};
@@ -1594,16 +1602,20 @@ run JMeter unless all the JMeter jars ar
             upload(srcFile);
         } else if ("publish".equals(type)) {
             publish(srcFile, targetDir);
+        } else if ("delete".equals(type)) {
+            delete(srcFile, targetDir);
         }
       }
     }
-      RC = project.getProperty("RC");
-      if (RC == null) {
-        self.fail("RC property must be defined!");
-      }
       type = attributes.get("type");
-      version = project.getProperty("jmeter.version");
-      RCdir = "v"+version+"_"+RC+"/";
+      if (type.equals("delete")) {
+        version = project.getProperty("jmeter.old.version");
+        RC="";
+      } else {
+        version = project.getProperty("jmeter.version");
+        RC = project.getProperty("RC");
+        RCdir = "v"+version+"_"+RC+"/";
+      }
       tempfile = attributes.get("tempfile");
       self.log("Writing " + type + " script for version " + version + " " + RC + " into "
+ tempfile);
       distname = project.getProperty("dist.name");
@@ -1704,7 +1716,9 @@ run JMeter unless all the JMeter jars ar
         Usage:
           ant RC_upload  [-DrepoType=test|live] [-Djmeter.version=2.9] -DRC=RCn [-Dasf.ldap.password=secret
[-Dasf.ldap.usermame=user] ]
           ant RC_publish [-DrepoType=test|live] [-Djmeter.version=2.9] -DRC=RCn [-Dasf.ldap.password=secret
[-Dasf.ldap.usermame=user] ]
-          
+          ant release_delete  [-DrepoType=test|live]  -Djmeter.old.version=2.8      [-Dasf.ldap.password=secret
[-Dasf.ldap.usermame=user] ]
+          (the old version must be specified and different from the current version!)
+
         If the ldap password is not provided, svnmucc is invoked without the username (-u)
and password (-p) parameters.
         In this case, svnmucc will use whatever stored credentials are present for the svn
host.
         
@@ -1729,6 +1743,7 @@ run JMeter unless all the JMeter jars ar
   </target>
 
   <target name="RC_publish" description="Publish release candidate from svnpubsub area"
depends="init-version">
+    <fail message="RC property must be defined!" unless="RC"/>
     <echo>Version = ${jmeter.version} ${RC}</echo>
     <property name="dist.name" value="apache-jmeter-${jmeter.version}"/>
     <property name="tempfile" value="svnmucc_publish.tmp"/>
@@ -1738,6 +1753,17 @@ run JMeter unless all the JMeter jars ar
     </antcall>
   </target>
 
+  <target name="release_delete" description="Delete old release candidate from svnpubsub
area" depends="init-version">
+    <fail message="jmeter.old.version property must be defined!" unless="jmeter.old.version"/>
+    <echo>Version = ${jmeter.old.version}</echo>
+    <property name="dist.name" value="apache-jmeter-${jmeter.old.version}"/>
+    <property name="tempfile" value="svnmucc_delete.tmp"/>
+    <svnmuccScript type="delete" tempfile="${dist.dir}/${tempfile}"/>
+    <antcall target="_svnmucc">
+      <param name="message" value="Deleting old release ${dist.name}"/>
+    </antcall>
+  </target>
+
   <!-- 
         Upload jars/poms/sigs to local (/target), snapshots or releases repos; default is
local.
         By default, deploys the artifacts to target/deploy under JMeter home.



Mime
View raw message