diff --git a/.travis.yml b/.travis.yml index 0f4a96ed8..b46ae4087 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ before_script: - psql -c 'CREATE EXTENSION hstore;' -U postgres -d qgep script: - - $TRAVIS_BUILD_DIR/scripts/db_setup.sh > /dev/null + - $TRAVIS_BUILD_DIR/scripts/db_setup.sh -r > /dev/null - nosetests after_success: diff --git a/scripts/db_setup.sh b/scripts/db_setup.sh index bbd16905d..2969d76aa 100755 --- a/scripts/db_setup.sh +++ b/scripts/db_setup.sh @@ -26,11 +26,14 @@ then PGSERVICE=pg_qgep fi -while getopts ":fs:p:" opt; do +while getopts ":rfs:p:" opt; do case $opt in f) force=True ;; + r) + roles=True + ;; s) SRID=$OPTARG echo "-s was triggered, SRID: $SRID" >&2 @@ -95,4 +98,6 @@ psql "service=${PGSERVICE}" -v ON_ERROR_STOP=1 -c "$(${DIR}/view/vw_oo_organisat psql "service=${PGSERVICE}" -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/view/vw_catchment_area_connections.sql psql "service=${PGSERVICE}" -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/view/vw_change_points.sql -psql "service=${PGSERVICE}" -v ON_ERROR_STOP=1 -f ${DIR}/12_roles.sql +if [[ $roles ]]; then + psql "service=${PGSERVICE}" -v ON_ERROR_STOP=1 -f ${DIR}/12_roles.sql +fi