Skip to content

Commit a35868d

Browse files
committed
build: Add target to determine and report release version
1 parent 7e89c33 commit a35868d

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

build.xml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,34 @@
863863
</target>
864864

865865

866+
867+
<!--
868+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
869+
Determine the release version and tag name.
870+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
871+
-->
872+
<target name="determineReleaseVersion" depends="prepare" description="determine the release version and tag name">
873+
<!-- release -->
874+
<property name="dryrun" value="true" />
875+
<mx:version stage="release" dryrun="${dryrun}" />
876+
<property name="project.tag" value="v${project.version}" />
877+
878+
<!-- output version information for other scripts/programs to pick up -->
879+
<mx:if>
880+
<and>
881+
<isset property="versionInfo" />
882+
<not><equals arg1="${versionInfo}" arg2="" trim="true"/></not>
883+
</and>
884+
<then>
885+
<echo file="${basedir}/${versionInfo}">
886+
GBLT_RELEASE_VERSION=${project.version}
887+
GBLT_RELEASE_TAG=${project.tag}
888+
</echo>
889+
</then>
890+
</mx:if>
891+
</target>
892+
893+
866894
<!--
867895
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
868896
Tag a new version and prepare for the next development cycle.
@@ -889,8 +917,8 @@
889917
</and>
890918
<then>
891919
<echo file="${basedir}/${versionInfo}">
892-
GB_RELEASE_VERSION=${project.version}
893-
GB_RELEASE_TAG=${project.tag}
920+
GBLT_RELEASE_VERSION=${project.version}
921+
GBLT_RELEASE_TAG=${project.tag}
894922
</echo>
895923
</then>
896924
</mx:if>

0 commit comments

Comments
 (0)