working on setup

remotes/origin/master
ppaulis 2016-10-06 13:29:55 +02:00
parent 9e87ebe922
commit b4297121c0
3 changed files with 20 additions and 1 deletions

View File

@ -97,10 +97,14 @@
</target> </target>
<target name="db-migration" description="Update the database version"> <target name="db-migration" description="Update the database version">
<exec command="${phinx.bin} migrate -c ./app/module/MonarcBO/migrations/phinx.php" passthru="true"/> <exec command="${project.basedir}/scripts/client-upgrade-db.sh MonarcBO localhost preproddev preproddev master" passthru="true"/>
</target> </target>
<target name="reset-db" <target name="reset-db"
description="Drop database and reset data" description="Drop database and reset data"
depends="drop-db, init-db, db-migration"/> depends="drop-db, init-db, db-migration"/>
<target name="init"
description="Setup external dependencies and migrate data"
depends="setup-db, db-migration"/>
</project> </project>

5
continuous.yml Normal file
View File

@ -0,0 +1,5 @@
# continuous.yml
deployment:
hooks:
AfterInstall:
- command: scripts/migrate.sh

10
scripts/migrate.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
cd /var/www/continuousphp/current
while [ ! -f /var/lib/continuousphp/credentials.ini ]
do
sleep 2
done
vendor/bin/phing -propertyfile /var/lib/continuousphp/credentials.ini init
chown -R www-data:www-data /var/www/continuousphp/current/*