blob: 221cb78df84c4069c2040f0135bd2207ed8dade9 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
Invoked after a branch or a tag has been created in order to update version numbers.
See http://sis.apache.org/release-management.html
-->
<project name="prepare-release">
<!-- Invoked after a branch has been created from the trunk. -->
<target name="branch">
<!-- Ensure that the "sis-build-helper" plugin used by the build is the released version. -->
<replaceregexp file = "${user.dir}/pom.xml"
match = "&lt;sis\.plugin\.version&gt;.+&lt;/sis\.plugin\.version&gt;"
replace = "&lt;sis.plugin.version&gt;${branch.version}-SNAPSHOT&lt;/sis.plugin.version&gt;"/>
<!-- The -SNAPSHOT part will be removed later, at tag creation. -->
<!-- Replace the version number in Java code. -->
<replaceregexp file = "${user.dir}/core/sis-utility/src/main/java/org/apache/sis/util/Version.java"
match = "MINOR_VERSION\s*\+\s*&quot;-SNAPSHOT&quot;"
replace = "MINOR_VERSION"/>
<!-- Replace URL to trunk by URL to the branch on Subversion. -->
<replace dir="${user.dir}" failOnNoReplacements="true">
<include name="**/pom.xml"/>
<replacefilter token="svn.apache.org/repos/asf/sis/trunk"
value="svn.apache.org/repos/asf/sis/branches/${branch.version}"/>
<replacefilter token="svn.apache.org/viewvc/sis/trunk"
value="svn.apache.org/viewvc/sis/branches/${branch.version}"/>
</replace>
</target>
<!-- Invoked after a tag has been created from the branch. -->
<target name="tag">
<!-- Replace URL to branch by URL to the branch on Subversion. -->
<replace dir="${user.dir}" failOnNoReplacements="true">
<include name="**/pom.xml"/>
<replacefilter token="svn.apache.org/repos/asf/sis/branches/${branch.version}"
value="svn.apache.org/repos/asf/sis/tags/${sis.version}"/>
<replacefilter token="svn.apache.org/viewvc/sis/branches/${branch.version}"
value="svn.apache.org/viewvc/sis/tags/${sis.version}"/>
</replace>
<!-- Replace version numbers. Note that no snapshot other than SIS can exist at this point. -->
<replace dir="${user.dir}" failOnNoReplacements="true">
<include name="**/pom.xml"/>
<replacefilter token="&lt;version&gt;${branch.version}-SNAPSHOT&lt;/version&gt;"
value="&lt;version&gt;${sis.version}&lt;/version&gt;"/>
<replacefilter token="&lt;sis.plugin.version&gt;${branch.version}-SNAPSHOT&lt;/sis.plugin.version&gt;"
value="&lt;sis.plugin.version&gt;${sis.version}&lt;/sis.plugin.version&gt;"/>
</replace>
</target>
</project>