mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 09:52:16 -05:00
Automate publishing of the changelogs.
Publishes the changelog on github using a gh-pages branch. This implementation changes back and forth between git branches without updating the working tree. This should be faster because the branches are unrelated so updating the tree would require removing and recreating all the files.
This commit is contained in:
parent
3d6a7b6409
commit
57c998becc
39
build.xml
39
build.xml
@ -155,7 +155,7 @@
|
||||
</target>
|
||||
|
||||
<!-- rules -->
|
||||
<target name="bump-version" depends="-set-version,-commit-version">
|
||||
<target name="bump-version" depends="-set-version,-commit-version,-update-gh-pages-branch,-push-version">
|
||||
<echo>Bumped K-9 to ${version-name}</echo>
|
||||
</target>
|
||||
|
||||
@ -166,6 +166,43 @@
|
||||
<exec executable="git" failonerror="true">
|
||||
<arg line="tag ${version-name}" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- Copy the changelog to the 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">
|
||||
<arg line="symbolic-ref HEAD" />
|
||||
</exec>
|
||||
<exec executable="git" failonerror="true">
|
||||
<arg line="symbolic-ref HEAD refs/heads/gh-pages" />
|
||||
</exec>
|
||||
<exec executable="git" failonerror="true">
|
||||
<arg line="reset -q" />
|
||||
</exec>
|
||||
<exec executable="git" failonerror="true" outputproperty="git-ls-tree" errorproperty="git-ls-tree-error">
|
||||
<arg line="ls-tree ${git-branch-ref} res/xml/changelog_master.xml" />
|
||||
</exec>
|
||||
<regex property="changelog-path-dst" input="${git-branch-ref}" regexp=".*/([^/]+$)" select="changelog_\1_branch.xml" />
|
||||
<regex property="git-index-info" input="${git-ls-tree}" regexp="(.*\t).*" select="\1${changelog-path-dst}" />
|
||||
<exec executable="git" failonerror="true" inputstring="${git-index-info}">
|
||||
<arg line="update-index --index-info" />
|
||||
</exec>
|
||||
<exec executable="git" failonerror="true">
|
||||
<arg line="commit -m'Update changelog for version ${version-name}'" />
|
||||
</exec>
|
||||
<exec executable="git" failonerror="true">
|
||||
<arg line="symbolic-ref HEAD ${git-branch-ref}" />
|
||||
</exec>
|
||||
<exec executable="git" failonerror="true">
|
||||
<arg line="reset -q" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="-push-version">
|
||||
<exec executable="git" failonerror="true">
|
||||
<arg line="push" />
|
||||
</exec>
|
||||
|
@ -1,4 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml-stylesheet type="text/xsl" href="changelog_style.xsl"?>
|
||||
<!--
|
||||
The master change log is kept in res/xml/changelog_master.xml.
|
||||
Locale specific versions are kept in res/xml-<locale qualifier>/changelog.xml.
|
||||
|
||||
Don't edit the changelog_<name>_branch.xml files in the gh-pages branch.
|
||||
They are automatically updated with "ant bump-version".
|
||||
-->
|
||||
<changelog>
|
||||
<release version="4.508" versioncode="18008" >
|
||||
<change>Move 'share' menu item back, at least for the moment</change>
|
||||
|
Loading…
Reference in New Issue
Block a user