Skip to content
This repository
Browse code

Adding task to cut a release tag and push it.

  • Loading branch information...
commit ce80a787638ea9d8c9024042fb0291401b85a709 1 parent 6361500
Mark Story authored December 28, 2011
4  build.properties
... ...
@@ -1,6 +1,10 @@
1 1
 # Name
2 2
 project.name = CakePHP
3 3
 
  4
+# Git stuff
  5
+git.remote = 
  6
+
4 7
 # Directories
5 8
 build.dir = build
6 9
 dist.dir = dist
  10
+
31  build.xml
@@ -92,6 +92,8 @@
92 92
 			<channel>pear.php.net</channel>
93 93
 			<description>CakePHP </description>
94 94
 			<lead user="mark_story" name="Mark Story" email="mark@mark-story.com" />
  95
+			<lead user="lorenzo" name="José Lorenzo Rodríguez" email="jose.zap@gmail.com" />
  96
+			<lead user="PhpNut" name="Larry Masters" email="phpnut@cakephp.org" />
95 97
 			<license>MIT License</license>
96 98
 			<version release="${pear.version}" api="${pear.version}" />
97 99
 			<stability release="${pear.stability}" api="${pear.stability}" />
@@ -117,24 +119,43 @@
117 119
 		<move file="${build.dir}/${project.name}-${version}/${project.name}-${pear.version}.tgz" todir="${dist.dir}" />
118 120
 	</target>
119 121
 
120  
-	<!-- top level easy to type target -->
121  
-	<target name="build" depends="generate-package" />
122  
-
123  
-
124 122
 	<!--
125 123
 		Bump the version number and commit that.
126 124
 	-->
127 125
 	<target name="next-version" depends="prepare">
128 126
 		<echo msg="Incrementing version." />
129 127
 		<propertyprompt propertyName="release_version" defaultValue="${version}" promptText="Enter version to be released (without -DEV)"/>
130  
-		<echo msg="New version will be ${release_version}" />
131 128
 		<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);" />
132 129
 		<exec executable="php">
133 130
 			<arg value="-r" />
134 131
 			<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);" />
135 132
 		</exec>
  133
+		<echo msg="Version number updated." />
  134
+	</target>
136 135
 
  136
+	<target name="release-commit" depends="prepare,next-version">
  137
+		<echo msg="Creating new release commit" />
  138
+		<exec command="git add ./lib/Cake/VERSION.txt" />
  139
+		<exec command="git commit -m 'Update version number to ${release_version}'" />
  140
+		<exec command="git tag -a ${release_version} -m 'CakePHP ${release_version}'" />
  141
+
  142
+		<propertyprompt propertyName="shipit" defaultValue="n" promptText="Ship the new commit and tag?" />
  143
+		<condition property="noshipit" value="1">
  144
+			<not>
  145
+				<equals arg1="y" arg2="${shipit}" casesensitive="false" />
  146
+			</not>
  147
+		</condition>
  148
+		<fail if="noshipit" msg="You said not to ship it." />
  149
+
  150
+		<exec command="git push ${git.remote}" />
  151
+		<exec command="git push --tags ${git.remote}" />
  152
+		<echo msg="Pushed commit and tag." />
137 153
 	</target>
138 154
 
139 155
 
  156
+	<!-- top level easy to type targets -->
  157
+	<target name="build" depends="generate-package" />
  158
+	<target name="release" depends="release-commit,build" />
  159
+
  160
+
140 161
 </project>

0 notes on commit ce80a78

Please sign in to comment.
Something went wrong with that request. Please try again.