modularize build file a little, deal with existing dist workspace
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1559325 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0a4525efd7
commit
66733aa27d
|
@ -18,3 +18,5 @@
|
|||
|
||||
# Your apache ID - it is used for the Build-By MANIFEST header, when creating the RC jars
|
||||
apache.id=luckyRM
|
||||
# directory to use when crating the release
|
||||
release.path=${user.home}/lang-rc
|
|
@ -24,48 +24,60 @@
|
|||
-->
|
||||
<project name="release-lang" basedir="../../">
|
||||
|
||||
<property file="src/release-tools/build.properties" />
|
||||
<property file="default.properties" />
|
||||
|
||||
<target name="pre-rc" description="Prepares the download page and the release notes for rolling out a RC">
|
||||
|
||||
<exec executable="mvn">
|
||||
<arg value="changes:announcement-generate"/>
|
||||
<arg value="-Prelease-notes"/>
|
||||
</exec>
|
||||
<exec executable="mvn">
|
||||
<arg value="commons:download-page"/>
|
||||
<arg value="-Dcommons.componentid=lang"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="rc" description="Create the RC">
|
||||
|
||||
<property name="repo.path" value="${user.home}/.m2/repository/org/apache/commons/${component.name}/${component.version}" />
|
||||
<target name="-init">
|
||||
<property file="src/release-tools/build.properties" />
|
||||
<property file="default.properties" />
|
||||
<!-- provide some defaults -->
|
||||
<property name="release.path" value="${user.home}/lang-rc" />
|
||||
<property name="apache.id" value="dev@commons.apache.org" />
|
||||
<property name="release.url" value="https://dist.apache.org/repos/dist/dev/commons/lang" />
|
||||
|
||||
<delete dir="${repo.path}" />
|
||||
<macrodef name="mvn">
|
||||
<attribute name="goal"/>
|
||||
<element name="more-args" implicit="true" optional="true"/>
|
||||
<sequential>
|
||||
<exec executable="mvn">
|
||||
<arg value="@{goal}" />
|
||||
<more-args/>
|
||||
</exec>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<available property="dist-dir-exists?"
|
||||
file="${release.path}"
|
||||
type="dir"/>
|
||||
</target>
|
||||
|
||||
<target name="pre-rc" depends="-init"
|
||||
description="Prepares the download page and the release notes for rolling out a RC">
|
||||
<mvn goal="changes:announcement-generate">
|
||||
<arg value="-Prelease-notes"/>
|
||||
</mvn>
|
||||
<mvn goal="commons:download-page">
|
||||
<arg value="-Dcommons.componentid=lang"/>
|
||||
</mvn>
|
||||
</target>
|
||||
|
||||
<target name="-clear-local-repo" depends="-init">
|
||||
<property name="repo.path" value="${user.home}/.m2/repository/org/apache/commons/${component.name}/${component.version}" />
|
||||
<delete dir="${repo.path}" />
|
||||
</target>
|
||||
|
||||
<target name="-build-maven-artifacts" depends="-clear-local-repo">
|
||||
<input message="Please enter gpg passphrase..." addproperty="gpg.pass">
|
||||
<handler type="secure" />
|
||||
</input>
|
||||
|
||||
<exec executable="mvn">
|
||||
<arg value="deploy" />
|
||||
<mvn goal="deploy">
|
||||
<arg value="-Prelease" />
|
||||
<arg value="-Ptest-deploy" />
|
||||
<arg value="-Duser.name=${apache.id}" />
|
||||
<arg value="-Dgpg.passphrase=${gpg.pass}" />
|
||||
</exec>
|
||||
|
||||
<echo message="Checking out ${release.url} -> ${release.path}"/>
|
||||
<exec executable="svn">
|
||||
<arg value="co" />
|
||||
<arg value="${release.url}" />
|
||||
<arg value="${release.path}" />
|
||||
</exec>
|
||||
</mvn>
|
||||
</target>
|
||||
|
||||
<target name="-populate-dist-repo"
|
||||
depends="pre-rc, -build-maven-artifacts, -prepare-dist-area">
|
||||
<copy todir="${release.path}/binaries">
|
||||
<fileset dir="${repo.path}">
|
||||
<include name="*bin.zip*" />
|
||||
|
@ -81,11 +93,32 @@
|
|||
</copy>
|
||||
|
||||
<copy file="RELEASE-NOTES.txt" todir="${release.path}" />
|
||||
|
||||
<echo message="Creating site" />
|
||||
<exec executable="mvn">
|
||||
<arg value="site" />
|
||||
</exec>
|
||||
|
||||
</target>
|
||||
|
||||
<target name="rc" description="Create the RC"
|
||||
depends="-populate-dist-repo, -create-site"/>
|
||||
|
||||
<target name="-create-site" depends="-init">
|
||||
<echo message="Creating site" />
|
||||
<mvn goal="site"/>
|
||||
</target>
|
||||
|
||||
<target name="-prepare-dist-area" depends="-checkout-dist, -update-dist"/>
|
||||
|
||||
<target name="-checkout-dist" depends="-init" unless="dist-dir-exists?">
|
||||
<echo message="Checking out ${release.url} -> ${release.path}"/>
|
||||
<exec executable="svn">
|
||||
<arg value="co" />
|
||||
<arg value="${release.url}" />
|
||||
<arg value="${release.path}" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="-update-dist" depends="-init" if="dist-dir-exists?">
|
||||
<echo message="Updating ${release.path}"/>
|
||||
<exec executable="svn" dir="${release.path}">
|
||||
<arg value="up" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue