Skip to content
This repository
Browse code

Add git branch to phing build.

  • Loading branch information...
commit 19292a012b56b7bfa35044d160d5053a144c399b 1 parent a9c279a
Mark Story authored February 20, 2012

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  build.xml
5  build.xml
@@ -84,6 +84,9 @@
84 84
 		<property name="pear.package" value="${project.name}-${pear.version}" />
85 85
 
86 86
 		<echo msg="Preparing package of ${version} (${pear.version}+${pear.stability})" />
  87
+
  88
+		<!-- Get the current git branch -->
  89
+		<exec command="git name-rev HEAD 2>/dev/null | awk '{ print $2 }'" outputProperty="git.branch" />
87 90
 	</target>
88 91
 
89 92
 	<!--
@@ -180,7 +183,7 @@
180 183
 		<fail if="noshipit" msg="You said not to ship it." />
181 184
 
182 185
 		<echo msg="Pushing commit and tag." />
183  
-		<exec command="git push ${git.remote}" logoutput="true" checkreturn="true" />
  186
+		<exec command="git push ${git.remote} ${git.branch}" logoutput="true" checkreturn="true" />
184 187
 		<exec command="git push ${git.remote} ${release_version}" logoutput="true" checkreturn="true" />
185 188
 		<echo msg="Push complete." />
186 189
 	</target>

0 notes on commit 19292a0

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