Fix releaseType for .ZIP upload

This commit is contained in:
Dave Syer
2011-03-08 08:58:04 +00:00
parent 1b605042de
commit 2f76ca2bca
2 changed files with 18 additions and 11 deletions

15
pom.xml
View File

@@ -19,7 +19,6 @@
<dist.name>Spring AMQP</dist.name>
<dist.key>AMQP</dist.key>
<dist.version>${project.version}</dist.version>
<dist.releaseType>snapshot</dist.releaseType>
<dist.finalName>${dist.id}-${dist.version}</dist.finalName>
<dist.fileName>${dist.finalName}.zip</dist.fileName>
<dist.filePath>target/${dist.fileName}</dist.filePath>
@@ -221,18 +220,18 @@
<execution>
<id>upload-dist</id>
<phase>deploy</phase>
<configuration>
<tasks>
<ant antfile="${basedir}/src/ant/upload-dist.xml">
<target name="upload-dist" />
</ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<configuration>
<tasks>
<ant antfile="${basedir}/src/ant/upload-dist.xml">
<target name="upload-dist" />
</ant>
</tasks>
</configuration>
<dependencies>
<dependency>
<groupId>org.springframework.build</groupId>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0"?>
<project name="upload-dist-tasks">
<!-- can be run independent of maven as follows
<!-- can be run independent of maven as follows (but it's easier
to simply use "mvn antrun:run"):
- classpath must be uncommented below. when run from maven,
- the classpath is set up for you
@@ -9,7 +10,6 @@ ant -f src/ant/upload-dist.xml \
-Ddist.id=spring-amqp \
-Ddist.name='Spring AMQP' \
-Ddist.key=AMQP \
-Ddist.releaseType=milestone \
-Ddist.accessKey=<access key> \
-Ddist.secretKey=<secret key> \
-Ddist.bucketName=dist.springframework.org \
@@ -30,7 +30,15 @@ ant -f src/ant/upload-dist.xml \
</classpath>
-->
</taskdef>
<target name="upload-dist" depends="upload-s3,upload-staging"/>
<target name="upload-dist" depends="upload-prep,upload-s3,upload-staging"/>
<target name="upload-prep">
<condition property="dist.releaseType" value="snapshot">
<contains string="${dist.version}" substring="snapshot" casesensitive="false"/>
</condition>
<condition property="dist.releaseType" value="release" else="milestone">
<contains string="${dist.version}" substring="release" casesensitive="false"/>
</condition>
</target>
<target name="upload-s3" unless="dist.staging">
<checksum file="${dist.filePath}" algorithm="sha1"/>
<s3 accessKey="${dist.accessKey}" secretKey="${dist.secretKey}">