]> source.dussan.org Git - poi.git/commitdiff
release-prep1 should abort if release tag already exists. It's likely that the versio...
authorJaven O'Neal <onealj@apache.org>
Wed, 1 Feb 2017 00:59:20 +0000 (00:59 +0000)
committerJaven O'Neal <onealj@apache.org>
Wed, 1 Feb 2017 00:59:20 +0000 (00:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1781191 13f79535-47bb-0310-9956-ffa450edef68

build.xml

index 84d50fbf2528104b7c5feda5f45cae1b5e5b37b8..b07f253077e19efa0f66dbb7a5cd0e7eb73a1f62 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -2441,8 +2441,26 @@ under the License.
         />
     </target>
 
+    <target name="release-prep0" depends="-init-svn" description="check to make sure the release tag doesn't exist yet">
+        <!-- verify that svn username/password are valid ... -->
+        <fail message="Unable to connect to SVN repo. Verify apache-id username and password.">
+            <condition>
+                <!-- FIXME: svnExists doesn't work with https here. -->
+                <not><svnExists refid="svn.settings" target="http://svn.apache.org/repos/asf/poi/"/></not>
+            </condition>
+        </fail>
+
+        <!-- verify that the release tag that we're about to create in release-prep1 does not already exist (no overwriting tags!) -->
+        <fail message="Cannot create release tag. https://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG} already exists. Verify the requested release version.">
+            <condition>
+                <!-- FIXME: svnExists doesn't work with https here. -->
+                <svnExists refid="svn.settings" target="http://svn.apache.org/repos/asf/poi/tags/${RELEASE_TAG}/"/>
+            </condition>
+        </fail>
+    </target>
+
     <!-- experimental release preparation ... tbd. ... -->
-    <target name="release-prep1" depends="-init-svn" description="update the documentation and create the svn tag - needs Java7+">
+    <target name="release-prep1" depends="-init-svn,release-prep0" description="update the documentation and create the svn tag - needs Java7+">
         <local name="tstamp_rel"/>
         <local name="tstamp_next"/>
         <local name="rel_next"/>