]> source.dussan.org Git - gitblit.git/commitdiff
build: Add target to determine and report release version
authorFlorian Zschocke <f.zschocke+git@gmail.com>
Thu, 16 Dec 2021 22:41:42 +0000 (23:41 +0100)
committerFlorian Zschocke <f.zschocke+git@gmail.com>
Tue, 1 Feb 2022 21:58:30 +0000 (22:58 +0100)
build.xml

index c08a7b9a6aeab15f22d190c92dab1d317084ba4d..6f5de7f176d22ab7850311e361b249e785cbc56c 100644 (file)
--- a/build.xml
+++ b/build.xml
        </target>\r
 \r
 \r
+\r
+       <!--\r
+               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \r
+               Determine the release version and tag name.\r
+               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \r
+       -->\r
+       <target name="determineReleaseVersion" depends="prepare" description="determine the release version and tag name">\r
+               <!-- release -->\r
+               <property name="dryrun" value="true" />\r
+               <mx:version stage="release" dryrun="${dryrun}" />\r
+               <property name="project.tag" value="v${project.version}" />\r
+\r
+               <!-- output version information for other scripts/programs to pick up -->\r
+               <mx:if>\r
+                       <and>\r
+                               <isset property="versionInfo" />\r
+                               <not><equals arg1="${versionInfo}" arg2="" trim="true"/></not>\r
+                       </and>\r
+                       <then>\r
+                               <echo file="${basedir}/${versionInfo}">\r
+GBLT_RELEASE_VERSION=${project.version}\r
+GBLT_RELEASE_TAG=${project.tag}\r
+</echo>\r
+                       </then>\r
+               </mx:if>\r
+       </target>\r
+\r
+\r
        <!--\r
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \r
                Tag a new version and prepare for the next development cycle.\r
                        </and>\r
                        <then>\r
                                <echo file="${basedir}/${versionInfo}">\r
-GB_RELEASE_VERSION=${project.version}\r
-GB_RELEASE_TAG=${project.tag}\r
+GBLT_RELEASE_VERSION=${project.version}\r
+GBLT_RELEASE_TAG=${project.tag}\r
 </echo>\r
                        </then>\r
                </mx:if>\r