Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

NEW phing translations-mergeback

  • Loading branch information...
commit b3787dc7e3192582b63f41f5b52c54f6d8e0a27f 1 parent 2be8924
Ingo Schommer authored July 13, 2012

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

  1. 25  build.xml
25  build.xml
@@ -478,8 +478,31 @@ Your friendly automated release script.
478 478
 		<exec command="git stash pop" dir="${module}" />
479 479
 	</target>
480 480
 
  481
+	<target name="translations-mergeback"
  482
+		description="Copies changes from the translation staging branch back to the current branch. Doesn't use 'git merge' because the staging branch works on master. Usage: phing -Dmodule=<module> translations-mergeback">
  483
+
  484
+		<php function="sys_get_temp_dir" returnProperty="systmp" />
  485
+		<property name="tmp" value="${systmp}/translationsMergebackTask/" />
  486
+		<exec command="git fetch origin" dir="${module}" checkreturn="true" />
  487
+		<exec command="git branch --force --track translation-staging origin/translation-staging" dir="${module}" checkreturn="true" />
  488
+		<exec command="git checkout translation-staging" dir="${module}" checkreturn="true" />
  489
+		<copy todir="${tmp}/${module}">
  490
+			<fileset dir="${module}/lang" />
  491
+		</copy>
  492
+		<exec command="git checkout 3.0" dir="${module}" checkreturn="true" />
  493
+		<copy todir="${module}/lang" overwrite="true">
  494
+			<fileset dir="${tmp}/${module}/" />
  495
+		</copy>
  496
+
  497
+		<exec command="git add lang/*" dir="${module}" passthru="true" checkreturn="true" />
  498
+		<exec command="git commit -m 'Updated translations'" dir="${module}" passthru="true" checkreturn="true" />
  499
+
  500
+		<echo msg="Done! Please review the commit before pushing it, ensure no malicious code has been injected." />
  501
+
  502
+	</target>
  503
+
481 504
 	<target name="translations-sync" 
482  
-		description="Wrapper task to handle updating translations and master files, using the getlocalization.com API, committing to a specialized branch in the working copy and pushing to the origin repository.">
  505
+		description="Wrapper task to handle updating translations and master files, using the getlocalization.com API, committing to a specialized branch in the working copy and pushing to the origin repository. ">
483 506
 		<foreach list="framework,cms" param="module" target="translations-update-git-masterfile" />
484 507
 		<foreach list="framework,cms" param="module" target="translations-update-gl-masterfile" />
485 508
 		<foreach list="framework,cms" param="module" target="translations-update-gl-contribs" />

0 notes on commit b3787dc

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