diff options
author | Florian Zschocke <florian.zschocke@devolo.de> | 2020-01-27 20:30:44 +0100 |
---|---|---|
committer | Florian Zschocke <florian.zschocke@devolo.de> | 2020-01-27 21:48:20 +0100 |
commit | 6f3a7c526a0317e115312515fa66e6cb229b6894 (patch) | |
tree | 23ccc824b5be428d111cbf5e7411c420cc1c3cde /build.xml | |
parent | 47797715899308cebaf5a7ba003057ecc9378d8a (diff) | |
download | gitblit-6f3a7c526a0317e115312515fa66e6cb229b6894.tar.gz gitblit-6f3a7c526a0317e115312515fa66e6cb229b6894.zip |
Add project property `release.tag` as a global `project.tag`
Add property `release.tag` to keep a generally available property.
The `project.tag` was getting used in many places, so I need a global
definition for it. The property `project.tag`, defined in the target
`tagRelease` could not be reused, since when that target runs, the
version is still a SNAPSHOT version. (And properties don't get
re-assigned.) So instead a new property `release.tag` is defined,
just like `release.name`, which can be only used sensible in a
release stage, i.e. after `tagRelease` ran.
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -46,6 +46,7 @@ <mx:init verbose="no" mxroot="${moxie.dir}" />
<!-- Set Ant project properties -->
+ <property name="release.tag" value="v${project.version}" />
<property name="release.name" value="gitblit-${project.version}"/>
<property name="distribution.zipfile" value="${release.name}.zip" />
<property name="distribution.tgzfile" value="${release.name}.tar.gz" />
@@ -743,10 +744,10 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="releaseBinaries" depends="prepare" description="Publish the Gitblit binaries to a GitHub release">
- <property name="project.tag" value="v${project.version}" />
<ghReleaseDraft
- releaselog="${releaselog}"/>
+ releaselog="${releaselog}"
+ releasetag="${release.tag}"/>
<echo>Uploading Gitblit ${project.version} binaries</echo>
@@ -790,7 +791,6 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<target name="publishRelease" depends="prepare" description="Publish the GitHub release draft" >
- <property name="project.tag" value="v${project.version}" />
<echo>Publishing Gitblit ${project.version} release draft on GitHub</echo>
@@ -798,7 +798,7 @@ releaseVersion="${project.version}"/>
<exec executable="bash" logError="true" >
<arg value="-c" />
- <arg value="${octokit} -q edit_release fzs gitblit ${ghrelease.id} tag_name='${project.tag}'"></arg>
+ <arg value="${octokit} -q edit_release fzs gitblit ${ghrelease.id} tag_name='${release.tag}'"></arg>
</exec>
<ghPublishReleaseDraft
releaseid="${ghrelease.id}"/>
@@ -1090,11 +1090,12 @@ -->
<macrodef name="ghReleaseDraft">
<attribute name="releaselog" />
+ <attribute name="releasetag" />
<sequential>
<echo>Creating release ${project.tag} draft on GitHub</echo>
<exec executable="bash" logError="true" failonerror="true" outputproperty="ghrelease.id">
<arg value="-c" />
- <arg value="${octokit} create_release fzs gitblit ${project.tag} name=${project.version} draft=true | cut -f2"></arg>
+ <arg value="${octokit} create_release fzs gitblit @{releasetag} name=${project.version} draft=true | cut -f2"></arg>
</exec>
<exec executable="bash" logError="true" failonerror="true" outputproperty="ghrelease.upldUrl">
<arg value="-c" />
|