<description>The Apache POI project Ant build.</description>
- <property name="version.id" value="4.0.1-beta1"/>
+ <property name="version.id" value="4.0.1-SNAPSHOT"/>
<property name="release.rc" value="RC1"/>
<property environment="env"/>
<scriptdef name="release_tag" language="javascript">
var rel = ("REL_"+project.getProperty("version.id")).toUpperCase().replace(/\W/g,"_");
- if (rel.search(/BETA/) == -1) rel += "_FINAL";
project.setProperty("RELEASE_TAG", rel);
</scriptdef>
<release_tag/>
<scriptdef name="getnextrel" language="javascript">
var relCurr = new String(project.getProperty("version.id"));
var relNext = relCurr.replace(/[0-9]+$/, function(lastNum){ return new String(new Number(lastNum)+1); });
- if (relNext.search(/beta/i) == -1) relNext += "-beta1";
project.setProperty("rel_next", relNext);
</scriptdef>
<getnextrel/>
message="tag r${svn_version2} as ${version.id}"/>
</svn>
- <!-- update build.xml to the next beta version -->
+ <!-- update build.xml to the next snapshot version -->
<antcall target="-update-build.xml">
<param name="version_id" value="${rel_next}"/>
</antcall>
</fileset>
</replaceregexp>
- <!-- unpin documentation and commit next beta version -->
+ <!-- unpin documentation and commit next snapshot version -->
<svn refid="svn.settings">
<update dir="." recurse="true"/>
<propset path="src" name="svn:externals" value="documentation https://svn.apache.org/repos/asf/poi/site/src/documentation"/>
</svn>
</target>
+ <target name="release-finish" description="write the dist to the release candidate repo - needs Java7+">
+ <!--svn refid="svn.settings">
+ <update dir="." recurse="true"/>
+ </svn-->
+ <local name="rel_prev"/>
+ <local name="file_date"/>
+ <local name="file_date_iso"/>
+
+ <tstamp>
+ <!-- usually overwritten by a command line argument -->
+ <!-- for convience this is kept in the same format as in the release-prep call -->
+ <format property="file_date" pattern="yyyyMMdd" locale="US"/>
+ </tstamp>
+
+
+ <scriptdef name="getnextrel" language="javascript">
+ var relPrev = new String(project.getProperty("version.id"))
+ .replace(/([0-9]+)[^0-9]*$/, function(all,lastNum){ return new String(new Number(lastNum)-1); });
+ project.setProperty("rel_prev", relPrev);
+ var fileDateIso = new String(project.getProperty("file_date"))
+ .replace(/([0-9]{4})([0-9]{2})([0-9]{2})/, "$1-$2-$3");
+ project.setProperty("file_date_iso", fileDateIso);
+ </scriptdef>
+ <getnextrel/>
+
+ <replaceregexp file="build.gradle" match="( +version += +)'[^']+'" replace="\1'${version.id}'"/>
+ <replaceregexp file="build.gradle" match="(japicmpversion += +)'[^']+'" replace="\1'${rel_prev}'"/>
+ <replaceregexp file="src/examples/groovy/build.gradle" match="( *compile 'org.apache.poi:[^0-9]+)([0-9.]+)'" replace="\1${rel_prev}'" byline="true"/>
+ <replaceregexp file="src/examples/scala/build.sbt" match='( *org.apache.poi.* ")[0-9.]+(.+)' replace="\1${rel_prev}\2" byline="true"/>
+ <replaceregexp file="osgi/build.xml" match='(name="version.id" value=")[^"]+' replace="\1${version.id}"/>
+ <replaceregexp file="doap_POI.rdf" match="<release>" replace="<release> <Version> <name>Apache POI ${rel_prev}</name> <created>${file_date_iso}</created> <revision>${rel_prev}</revision> </Version> </release> <release>"/>
+
+ <replaceregexp match="(<version>)[^<]+" replace="\1${version.id}">
+ <fileset dir="sonar" includes="**/pom.xml"/>
+ </replaceregexp>
+ </target>
+
+
+
<target name="-update-build.xml">
<replaceregexp byline="true">
<regexp pattern="(<property name="version.id" value=")[^"]+("/>)"/>
<format property="rel_date" pattern="dd MMMM yyyy" locale="US"/>
<format property="file_date" pattern="yyyyMMdd" locale="US"/>
</tstamp>
- <!-- TODO: change reltype (dev/release), depending on BETA / FINAL -->
- <property name="reltype" value="dev"/>
- <property name="baseurl" value="https://www.apache.org/dist/poi/${reltype}"/>
+ <property name="baseurl" value="https://www.apache.org/dist/poi/release"/>
<loadChecksum property="bin-tar-sha256" url="${baseurl}/bin/poi-bin-${version.id}-${file_date}.tar.gz.sha256"/>
<loadChecksum property="bin-tar-sha512" url="${baseurl}/bin/poi-bin-${version.id}-${file_date}.tar.gz.sha512"/>
</p>
<section id="POI-${version.id}-bin"><title>Binary Distribution</title>
<ul>
- <li><a href="https://www.apache.org/dyn/closer.lua/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.tar.gz">poi-bin-${version.id}-${file_date}.tar.gz</a>
- (${bin-tar-size} MB, <a href="https://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.tar.gz.asc">signature (.asc)</a>)
+ <li><a href="https://www.apache.org/dyn/closer.lua/poi/release/bin/poi-bin-${version.id}-${file_date}.tar.gz">poi-bin-${version.id}-${file_date}.tar.gz</a>
+ (${bin-tar-size} MB, <a href="https://www.apache.org/dist/poi/release/bin/poi-bin-${version.id}-${file_date}.tar.gz.asc">signature (.asc)</a>)
<br/>
- SHA256 checksum: <a href="https://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.tar.gz.sha256">
+ SHA256 checksum: <a href="https://www.apache.org/dist/poi/release/bin/poi-bin-${version.id}-${file_date}.tar.gz.sha256">
${bin-tar-sha256}</a>
<br/>
- SHA512 checksum: <a href="https://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.tar.gz.sha512">
+ SHA512 checksum: <a href="https://www.apache.org/dist/poi/release/bin/poi-bin-${version.id}-${file_date}.tar.gz.sha512">
${bin-tar-sha512}</a>
</li>
- <li><a href="https://www.apache.org/dyn/closer.lua/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.zip">poi-bin-${version.id}-${file_date}.zip</a>
- (${bin-zip-size} MB, <a href="https://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.zip.asc">signature (.asc)</a>)
+ <li><a href="https://www.apache.org/dyn/closer.lua/poi/release/bin/poi-bin-${version.id}-${file_date}.zip">poi-bin-${version.id}-${file_date}.zip</a>
+ (${bin-zip-size} MB, <a href="https://www.apache.org/dist/poi/release/bin/poi-bin-${version.id}-${file_date}.zip.asc">signature (.asc)</a>)
<br/>
- SHA256 checksum: <a href="https://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.zip.sha256">
+ SHA256 checksum: <a href="https://www.apache.org/dist/poi/release/bin/poi-bin-${version.id}-${file_date}.zip.sha256">
${bin-zip-sha256}</a>
<br/>
- SHA512 checksum: <a href="https://www.apache.org/dist/poi/${reltype}/bin/poi-bin-${version.id}-${file_date}.zip.sha512">
+ SHA512 checksum: <a href="https://www.apache.org/dist/poi/release/bin/poi-bin-${version.id}-${file_date}.zip.sha512">
${bin-zip-sha512}</a>
</li>
</ul>
</section>
<section id="POI-${version.id}-src"><title>Source Distribution</title>
<ul>
- <li><a href="https://www.apache.org/dyn/closer.lua/poi/${reltype}/src/poi-src-${version.id}-${file_date}.tar.gz">poi-src-${version.id}-${file_date}.tar.gz</a>
- (${src-tar-size} MB, <a href="https://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.tar.gz.asc">signature (.asc)</a>)
+ <li><a href="https://www.apache.org/dyn/closer.lua/poi/release/src/poi-src-${version.id}-${file_date}.tar.gz">poi-src-${version.id}-${file_date}.tar.gz</a>
+ (${src-tar-size} MB, <a href="https://www.apache.org/dist/poi/release/src/poi-src-${version.id}-${file_date}.tar.gz.asc">signature (.asc)</a>)
<br/>
- SHA256 checksum: <a href="https://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.tar.gz.sha256">
+ SHA256 checksum: <a href="https://www.apache.org/dist/poi/release/src/poi-src-${version.id}-${file_date}.tar.gz.sha256">
${src-tar-sha256}</a>
<br/>
- SHA512 checksum: <a href="https://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.tar.gz.sha512">
+ SHA512 checksum: <a href="https://www.apache.org/dist/poi/release/src/poi-src-${version.id}-${file_date}.tar.gz.sha512">
${src-tar-sha512}</a>
</li>
- <li><a href="https://www.apache.org/dyn/closer.lua/poi/${reltype}/src/poi-src-${version.id}-${file_date}.zip">poi-src-${version.id}-${file_date}.zip</a>
- (${src-zip-size} MB, <a href="https://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.zip.asc">signature (.asc)</a>)
+ <li><a href="https://www.apache.org/dyn/closer.lua/poi/release/src/poi-src-${version.id}-${file_date}.zip">poi-src-${version.id}-${file_date}.zip</a>
+ (${src-zip-size} MB, <a href="https://www.apache.org/dist/poi/release/src/poi-src-${version.id}-${file_date}.zip.asc">signature (.asc)</a>)
<br/>
- SHA256 checksum: <a href="https://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.zip.sha256">
+ SHA256 checksum: <a href="https://www.apache.org/dist/poi/release/src/poi-src-${version.id}-${file_date}.zip.sha256">
${src-zip-sha256}</a>
<br/>
- SHA512 checksum: <a href="https://www.apache.org/dist/poi/${reltype}/src/poi-src-${version.id}-${file_date}.zip.sha512">
+ SHA512 checksum: <a href="https://www.apache.org/dist/poi/release/src/poi-src-${version.id}-${file_date}.zip.sha512">
${src-zip-sha512}</a>
</li>
</ul>