Skip to content

Commit

Permalink
Fixes #1286: Silence git output when it may output fatal errors. (#1289)
Browse files Browse the repository at this point in the history
* Fixes #186: Silence git output when it may output fatal errors.

* Trimming wc output.
  • Loading branch information
grasmash authored Apr 3, 2017
1 parent 0d211d9 commit f98e350
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions phing/tasks/deploy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,14 @@
<exec command="echo ${deploy.remote} | openssl md5 | cut -d' ' -f 2" outputProperty="remoteName" checkreturn="true" level="${blt.exec_level}"/>
<exec command="git remote add ${remoteName} ${deploy.remote}" dir="${deploy.dir}" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>

<!-- @todo Only call this for the first remote. -->
<phingcall target="deploy:remote:pull" />
<!-- Pull from only the first git remote. -->
<exec dir="${deploy.dir}" command="git remote -v | wc -l | awk {'print $1'}" outputProperty="deploy.remotes.count" checkreturn="false" logoutput="false"/>
<if>
<equals arg1="${deploy.remotes.count}" arg2="0"/>
<then>
<phingcall target="deploy:remote:pull" />
</then>
</if>
</target>

<target name="deploy:remote:pull" description="Checks out deploy branch from upstream remote." hidden="true">
Expand Down

0 comments on commit f98e350

Please sign in to comment.