Skip to content

Commit

Permalink
Another update
Browse files Browse the repository at this point in the history
  • Loading branch information
talavis committed Mar 7, 2020
1 parent 1b6cd85 commit 0922487
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/travis_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@ echo '>>> Preparing for testing: Fix settings.json file'
cp settings_sample.json settings.json

sed -i.tmp 's/"postgresHost" : "postgres host"/"postgresHost" : "127.0.0.1"/' settings.json
sed -i.tmp 's/"postgresPort" : 5432/"postgresPort" : 5433/' settings.json
sed -i.tmp "s/\"postgresName\" : \"swefreq\"/\"postgresName\" : \"$DBNAME\"/" settings.json

echo 'SETTINGS'
cat settings.json
echo '/SETTINGS'


echo '>>> Test 1: The SQL Patch'

LATEST_RELEASE=$(git tag | grep '^v' | sort -V | tail -n 1)
git show "$LATEST_RELEASE:sql/*_schema.sql" > master-schema.sql

psql -U postgres -h 127.0.0.1 < <(echo "CREATE DATABASE $DBNAME")
echo "CREATE DATABASE $DBNAME" > create_db.sql
psql -U postgres -h 127.0.0.1 -f create_db.sql
psql -U postgres -h 127.0.0.1 -f master-schema.sql "$DBNAME"
psql -U postgres -h 127.0.0.1 -f sql/patch-master-db.sql "$DBNAME"

Expand Down

0 comments on commit 0922487

Please sign in to comment.