mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
New "-pre-bump-check" target for sanity checks.
Perform all sanity checks before making any changes.
This commit is contained in:
parent
b8b21a0bcb
commit
b795106289
36
build.xml
36
build.xml
@ -130,17 +130,7 @@
|
|||||||
<regex property="version-name" input="${major}." regexp="(\d+.)" replace="\1${minor}" />
|
<regex property="version-name" input="${major}." regexp="(\d+.)" replace="\1${minor}" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="-set-version" depends="-get-version-name,-get-version-code">
|
<target name="-pre-bump-check" depends="-get-version-name,-auto-incr-version">
|
||||||
<!-- pass -Dversion-name=4.200 to define the version instead of auto-incrementing it -->
|
|
||||||
<if.contrib>
|
|
||||||
<isset property="version-name" />
|
|
||||||
<else>
|
|
||||||
<runtarget target="-auto-incr-version" />
|
|
||||||
</else>
|
|
||||||
</if.contrib>
|
|
||||||
|
|
||||||
<echo>Setting version to ${version-name}</echo>
|
|
||||||
|
|
||||||
<xpath
|
<xpath
|
||||||
input="${changelog-path-src}"
|
input="${changelog-path-src}"
|
||||||
expression="/changelog/release[@version='${version-name}']/@version"
|
expression="/changelog/release[@version='${version-name}']/@version"
|
||||||
@ -163,6 +153,24 @@
|
|||||||
</else>
|
</else>
|
||||||
</if.contrib>
|
</if.contrib>
|
||||||
|
|
||||||
|
<!-- Check for a clean index, because it will be reset in -update-gh-pages-branch -->
|
||||||
|
<exec executable="git" failonerror="true">
|
||||||
|
<arg line="diff-index --cached --quiet HEAD" />
|
||||||
|
</exec>
|
||||||
|
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="-set-version" depends="-get-version-name,-get-version-code">
|
||||||
|
<!-- pass -Dversion-name=4.200 to define the version instead of auto-incrementing it -->
|
||||||
|
<if.contrib>
|
||||||
|
<isset property="version-name" />
|
||||||
|
<else>
|
||||||
|
<runtarget target="-auto-incr-version" />
|
||||||
|
</else>
|
||||||
|
</if.contrib>
|
||||||
|
|
||||||
|
<echo>Setting version to ${version-name}</echo>
|
||||||
|
|
||||||
<replace file="AndroidManifest.xml"
|
<replace file="AndroidManifest.xml"
|
||||||
token="android:versionName="${current-version-name}""
|
token="android:versionName="${current-version-name}""
|
||||||
value="android:versionName="${version-name}"" summary="true"
|
value="android:versionName="${version-name}"" summary="true"
|
||||||
@ -176,7 +184,7 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- rules -->
|
<!-- rules -->
|
||||||
<target name="bump-version" depends="-set-version,-commit-version,-update-gh-pages-branch,-push-version">
|
<target name="bump-version" depends="-pre-bump-check,-set-version,-commit-version,-update-gh-pages-branch,-push-version">
|
||||||
<echo>Bumped K-9 to ${version-name}</echo>
|
<echo>Bumped K-9 to ${version-name}</echo>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@ -191,10 +199,6 @@
|
|||||||
|
|
||||||
<!-- Copy the changelog to the gh-pages branch. -->
|
<!-- Copy the changelog to the gh-pages branch. -->
|
||||||
<target name="-update-gh-pages-branch">
|
<target name="-update-gh-pages-branch">
|
||||||
<!-- Check for a clean index, because it's about to be reset -->
|
|
||||||
<exec executable="git" failonerror="true">
|
|
||||||
<arg line="diff-index --cached --quiet HEAD" />
|
|
||||||
</exec>
|
|
||||||
<exec executable="git" failonerror="true" outputproperty="git-branch-ref" errorproperty="git-branch-ref-error">
|
<exec executable="git" failonerror="true" outputproperty="git-branch-ref" errorproperty="git-branch-ref-error">
|
||||||
<arg line="symbolic-ref HEAD" />
|
<arg line="symbolic-ref HEAD" />
|
||||||
</exec>
|
</exec>
|
||||||
|
Loading…
Reference in New Issue
Block a user