build.sh 1.29 KB
Newer Older
llaffont's avatar
llaffont committed
1
#!/bin/bash
Laurent's avatar
Laurent committed
2 3 4
DBNAME=$1
DBUSER=$2
DBPASS=$3
5
DBHOST=$4
6

7
source ./update.sh
8
cp config.ini.default config.ini
9
sed -i "s/sgbd.config.host = localhost/sgbd.config.host = $DBHOST/g" config.ini
Laurent's avatar
Laurent committed
10 11 12
sed -i "s/sgbd.config.username =/sgbd.config.username = $DBUSER/g" config.ini
sed -i "s/sgbd.config.password =/sgbd.config.password = $DBPASS/g" config.ini
sed -i "s/sgbd.config.dbname =/sgbd.config.dbname = $DBNAME/g" config.ini
13
touch local.php
14 15 16

php --version

17
php scripts/upgrade_db.php
18 19 20

cd cosmogramme
cp config.ref.php config.php
21
sed -i "s/integration_server=localhost/integration_server=$DBHOST/g" config.php
Laurent's avatar
Laurent committed
22 23 24
sed -i "s/integration_user=root/integration_user=$DBUSER/g" config.php
sed -i "s/integration_pwd=root/integration_pwd=$DBPASS/g" config.php
sed -i "s/integration_base=opac3/integration_base=$DBNAME/g" config.php
25 26
cd ..

27 28 29 30 31
phpunit -c tests/phpunit.xml --list-suites && phpunit -c tests/phpunit.xml --exclude-group no-ci \
    && phpunit -c tests/phpunit_db.xml --list-suites && phpunit -c tests/phpunit_db.xml --exclude-group no-ci \
    && phpunit -c tests/phpunit_js.xml --list-suites && phpunit -c tests/phpunit_js.xml --exclude-group no-ci \
    && cd cosmogramme/tests && phpunit --list-suites && phpunit --exclude-group no-ci \
    && cd ../cosmozend/tests && phpunit --list-suites && phpunit --exclude-group no-ci