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

Commit fadc4fa

Browse files
committed
Merge pull request #409 from localheinz/feature/phing
Enhancement: Deploy with Phing
2 parents bc94285 + 50a0452 commit fadc4fa

5 files changed

Lines changed: 126 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.idea/
22
.php_cs.cache
3+
build.properties
34
clover.xml
45
.vagrant
56
vendor

build.properties.dist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ssh.user =
2+
ssh.host =
3+
ssh.port =
4+
5+
project.root =

build.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project name="modules.zendframework.com" default="main">
3+
4+
<property file="build.properties" />
5+
6+
<target hidden="true" name="main">
7+
<echo message="Choose your task, please - use 'vendor/bin/phing -l' to see a list of available tasks" />
8+
</target>
9+
10+
<target hidden="true" name="git-pull">
11+
<echo message="Pull changes from origin" />
12+
<exec logoutput="true" checkreturn="true" command="ssh ${ssh.user}@${ssh.host} -p ${ssh.port} 'cd ${project.root}; git pull origin master'" />
13+
</target>
14+
15+
<target hidden="true" name="composer-install">
16+
<echo message="Install dependencies with Composer" />
17+
<exec logoutput="true" checkreturn="true" command="ssh ${ssh.user}@${ssh.host} -p ${ssh.port} 'cd ${project.root}; sudo composer install --no-dev'" />
18+
</target>
19+
20+
<target hidden="true" name="owner-change">
21+
<echo message="Changing owner" />
22+
<exec logoutput="true" checkreturn="true" command="ssh ${ssh.user}@${ssh.host} -p ${ssh.port} 'sudo chown -R www-data:www-data ${project.root}/data'" />
23+
</target>
24+
25+
<target name="deploy" description="Deploys application to production" depends="git-pull, composer-install, owner-change">
26+
<echo message="Successfully deployed to production" />
27+
</target>
28+
</project>

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"ext-intl": "*",
99
"ezyang/htmlpurifier": "4.6.*",
1010
"monolog/monolog": "~1.12",
11+
"phing/phing": "~2.10",
1112
"php": "~5.5",
1213
"socalnick/scn-social-auth": "1.14.1",
1314
"zendframework/zendframework": "~2.3.0",

composer.lock

Lines changed: 91 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)