Skip to content
This repository was archived by the owner on May 1, 2019. It is now read-only.

Commit 563bb00

Browse files
committed
Fix: Reset before pulling in changes
1 parent 2c99bf4 commit 563bb00

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

build.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
<echo message="Choose your task, please - use 'vendor/bin/phing -l' to see a list of available tasks" />
88
</target>
99

10+
<target hidden="true" name="git-reset">
11+
<echo message="Clean up" />
12+
<exec logoutput="true" checkreturn="true" command="ssh ${ssh.user}@${ssh.host} -p ${ssh.port} 'cd ${project.root}; git reset --hard HEAD'" />
13+
</target>
14+
1015
<target hidden="true" name="git-pull">
1116
<echo message="Pull changes from origin" />
1217
<exec logoutput="true" checkreturn="true" command="ssh ${ssh.user}@${ssh.host} -p ${ssh.port} 'cd ${project.root}; git pull origin master ${tag}'" />
@@ -22,7 +27,7 @@
2227
<exec logoutput="true" checkreturn="true" command="ssh ${ssh.user}@${ssh.host} -p ${ssh.port} 'chown -R www-data:www-data ${project.root}/data'" />
2328
</target>
2429

25-
<target name="deploy" description="Deploys application to production" depends="git-pull, composer-install, owner-change">
30+
<target name="deploy" description="Deploys application to production" depends="git-reset, git-pull, composer-install, owner-change">
2631
<echo message="Successfully deployed to production" />
2732
</target>
2833
</project>

0 commit comments

Comments
 (0)