This repository has been archived by the owner on May 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 159
/
build.xml
33 lines (26 loc) · 1.61 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="UTF-8"?>
<project name="modules.zendframework.com" default="main">
<property file="build.properties" />
<target hidden="true" name="main">
<echo message="Choose your task, please - use 'vendor/bin/phing -l' to see a list of available tasks" />
</target>
<target hidden="true" name="git-reset">
<echo message="Clean up" />
<exec logoutput="true" checkreturn="true" command="ssh ${ssh.user}@${ssh.host} -p ${ssh.port} 'cd ${project.root}; git reset --hard HEAD'" />
</target>
<target hidden="true" name="git-pull">
<echo message="Pull changes from origin" />
<exec logoutput="true" checkreturn="true" command="ssh ${ssh.user}@${ssh.host} -p ${ssh.port} 'cd ${project.root}; git pull origin master ${tag}'" />
</target>
<target hidden="true" name="composer-install">
<echo message="Install dependencies with Composer" />
<exec logoutput="true" checkreturn="true" command="ssh ${ssh.user}@${ssh.host} -p ${ssh.port} 'cd ${project.root}; composer install --no-dev'" />
</target>
<target hidden="true" name="doctrine-migration">
<echo message="Runs Doctrine migrations" />
<exec logoutput="true" checkreturn="true" command="ssh ${ssh.user}@${ssh.host} -p ${ssh.port} 'cd ${project.root}; php public/index.php migrations:migrate --no-interaction --verbose'" />
</target>
<target name="deploy" description="Deploys application to production" depends="git-reset, git-pull, composer-install, doctrine-migration">
<echo message="Successfully deployed to production" />
</target>
</project>