Adding task to cut a release tag and push it.

This commit is contained in:
mark_story 2011-12-28 23:04:06 -05:00
parent 6361500124
commit ce80a78763
2 changed files with 30 additions and 5 deletions

View file

@ -1,6 +1,10 @@
# Name
project.name = CakePHP
# Git stuff
git.remote =
# Directories
build.dir = build
dist.dir = dist

View file

@ -92,6 +92,8 @@
<channel>pear.php.net</channel>
<description>CakePHP </description>
<lead user="mark_story" name="Mark Story" email="mark@mark-story.com" />
<lead user="lorenzo" name="José Lorenzo Rodríguez" email="jose.zap@gmail.com" />
<lead user="PhpNut" name="Larry Masters" email="phpnut@cakephp.org" />
<license>MIT License</license>
<version release="${pear.version}" api="${pear.version}" />
<stability release="${pear.stability}" api="${pear.stability}" />
@ -117,24 +119,43 @@
<move file="${build.dir}/${project.name}-${version}/${project.name}-${pear.version}.tgz" todir="${dist.dir}" />
</target>
<!-- top level easy to type target -->
<target name="build" depends="generate-package" />
<!--
Bump the version number and commit that.
-->
<target name="next-version" depends="prepare">
<echo msg="Incrementing version." />
<propertyprompt propertyName="release_version" defaultValue="${version}" promptText="Enter version to be released (without -DEV)"/>
<echo msg="New version will be ${release_version}" />
<echo msg="$file = file_get_contents('./lib/Cake/VERSION.txt'); $file = str_replace('${version}', '${release_version}', $file); file_put_contents('./lib/Cake/VERSION.txt', $file);" />
<exec executable="php">
<arg value="-r" />
<arg value="$file = file_get_contents('./lib/Cake/VERSION.txt'); $file = str_replace('${version}', '${release_version}', $file); file_put_contents('./lib/Cake/VERSION.txt', $file);" />
</exec>
<echo msg="Version number updated." />
</target>
<target name="release-commit" depends="prepare,next-version">
<echo msg="Creating new release commit" />
<exec command="git add ./lib/Cake/VERSION.txt" />
<exec command="git commit -m 'Update version number to ${release_version}'" />
<exec command="git tag -a ${release_version} -m 'CakePHP ${release_version}'" />
<propertyprompt propertyName="shipit" defaultValue="n" promptText="Ship the new commit and tag?" />
<condition property="noshipit" value="1">
<not>
<equals arg1="y" arg2="${shipit}" casesensitive="false" />
</not>
</condition>
<fail if="noshipit" msg="You said not to ship it." />
<exec command="git push ${git.remote}" />
<exec command="git push --tags ${git.remote}" />
<echo msg="Pushed commit and tag." />
</target>
<!-- top level easy to type targets -->
<target name="build" depends="generate-package" />
<target name="release" depends="release-commit,build" />
</project>