use multiline statements rather than multiple if statements
This commit is contained in:
parent
68d9ec50c3
commit
256d09a3ec
1 changed files with 12 additions and 6 deletions
18
.travis.yml
18
.travis.yml
|
@ -25,12 +25,18 @@ before_install:
|
|||
|
||||
install:
|
||||
- mkdir -p data/config
|
||||
- if [[ "$DB" == "pgsql" ]]; then psql -c "SELECT set_config('log_statement', 'all', false);" -U postgres; fi
|
||||
- if [[ "$DB" == "pgsql" ]]; then psql -c "CREATE DATABASE shimmie;" -U postgres; fi
|
||||
- if [[ "$DB" == "pgsql" ]]; then echo '<?php define("DATABASE_DSN", "pgsql:user=postgres;password=;host=;dbname=shimmie");' > data/config/auto_install.conf.php ; fi
|
||||
- if [[ "$DB" == "mysql" ]]; then mysql -e "SET GLOBAL general_log = 'ON';" -uroot; fi
|
||||
- if [[ "$DB" == "mysql" ]]; then mysql -e "CREATE DATABASE shimmie;" -uroot; fi
|
||||
- if [[ "$DB" == "mysql" ]]; then echo '<?php define("DATABASE_DSN", "mysql:user=root;password=;host=localhost;dbname=shimmie");' > data/config/auto_install.conf.php ; fi
|
||||
- |
|
||||
if [[ "$DB" == "pgsql" ]]; then
|
||||
psql -c "SELECT set_config('log_statement', 'all', false);" -U postgres ;
|
||||
psql -c "CREATE DATABASE shimmie;" -U postgres ;
|
||||
echo '<?php define("DATABASE_DSN", "pgsql:user=postgres;password=;host=;dbname=shimmie");' > data/config/auto_install.conf.php ;
|
||||
fi
|
||||
- |
|
||||
if [[ "$DB" == "mysql" ]]; then
|
||||
mysql -e "SET GLOBAL general_log = 'ON';" -uroot ;
|
||||
mysql -e "CREATE DATABASE shimmie;" -uroot ;
|
||||
echo '<?php define("DATABASE_DSN", "mysql:user=root;password=;host=localhost;dbname=shimmie");' > data/config/auto_install.conf.php ;
|
||||
fi
|
||||
- if [[ "$DB" == "sqlite" ]]; then echo '<?php define("DATABASE_DSN", "sqlite:shimmie.sqlite");' > data/config/auto_install.conf.php ; fi
|
||||
- composer install
|
||||
- php install.php
|
||||
|
|
Reference in a new issue