Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix travis script.
James Cole5a2ef36f2ad8
diff --git a/.travis.yml b/.travis.ymlindex 55481d4251..a8f360bfff 100644--- a/.travis.yml+++ b/.travis.yml@@ -11,7 +11,7 @@ install:- php artisan clear-compiled- php artisan optimize- php artisan env- - ./test.sh --notest --reset+ - ./test.sh -r- php artisan envscript:diff --git a/test.sh b/test.shindex ba4bde7d36..6190e186af 100755--- a/test.sh+++ b/test.sh@@ -6,6 +6,20 @@ ORIGINALENV=./.envBACKUPENV=./.env.currentTESTINGENV=./.env.testing+# do something with flags:+rflag=''+tflag=''++while getopts 'rt' flag; do+ case "${flag}" in+ r) rflag='true' ;;+ t) tflag='true' ;;+ *) error "Unexpected option ${flag}" ;;+ esac+done+++# backup current config (if it exists):if [ -f $ORIGINALENV ]; thenmv $ORIGINALENV $BACKUPENV@@ -17,7 +31,8 @@ cp $TESTINGENV $ORIGINALENV# clear cache:php artisan cache:clear-if [[ "$@" == "--reset" ]]+# reset database (optional)+if [[ $rflag == "true" ]]thenecho "Must reset database"@@ -35,14 +50,21 @@ thencp $DATABASE $DATABASECOPYfi+# do not reset database (optional)+if [[ $rflag == "" ]]+then+ echo "Will not reset database"+fi+# take database from copy:cp $DATABASECOPY $DATABASE# run PHPUnit-if [[ "$@" == "--notest" ]]+if [[ $tflag == "" ]]thenecho "Must not run PHPUnit"else+ echo "Must run PHPUnit"phpunitfi