Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding task to cut a release tag and push it.

  • Loading branch information...
commit ce80a787638ea9d8c9024042fb0291401b85a709 1 parent 6361500
@markstory markstory authored
Showing with 30 additions and 5 deletions.
  1. +4 −0 build.properties
  2. +26 −5 build.xml
View
4 build.properties
@@ -1,6 +1,10 @@
# Name
project.name = CakePHP
+# Git stuff
+git.remote =
+
# Directories
build.dir = build
dist.dir = dist
+
View
31 build.xml
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.