Skip to content

Commit cb614e0

Browse files
committed
fix: fix problem with CI action
- revert to use the PGHOST env var for specifying pg server, works lcoally and in CI environment
1 parent 8b7b7d6 commit cb614e0

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ db-bootstrap:
7070

7171
.PHONY: db-teardown
7272
db-teardown:
73-
dropdb cpic -h localhost -U postgres
74-
psql -X -q -h localhost -U postgres -c "drop user cpic"
73+
dropdb cpic -h ${PGHOST} -U postgres
74+
psql -X -q -h ${PGHOST} -U postgres -c "drop user cpic"
7575

7676
.PHONY: db-init
7777
db-init: db-bootstrap db-update db-migrate
@@ -84,8 +84,8 @@ db-download:
8484

8585
.PHONY: db-refresh
8686
db-refresh:
87-
dropdb cpic -h localhost -U postgres && createdb cpic -h localhost -U postgres -O cpic
88-
gzip -cd out/cpic_db_dump.sql.gz | psql -d cpic -h localhost -U cpic
87+
dropdb cpic -h ${PGHOST} -U postgres && createdb cpic -h ${PGHOST} -U postgres -O cpic
88+
gzip -cd out/cpic_db_dump.sql.gz | psql -d cpic -h ${PGHOST} -U cpic
8989

9090
.PHONY: db-update
9191
db-update: db-download db-refresh
@@ -94,8 +94,8 @@ db-update: db-download db-refresh
9494
.PHONY: db-update-staging
9595
db-update-staging:
9696
@echo "Database image copied and refreshed"
97-
dropdb cpic-staging -h localhost -U postgres
98-
createdb cpic-staging -h localhost -U postgres
97+
dropdb cpic-staging -h ${PGHOST} -U postgres
98+
createdb cpic-staging -h ${PGHOST} -U postgres
9999
pg_dump cpic | psql cpic-staging
100100

101101
.PHONY: db-migrate
@@ -119,7 +119,7 @@ clean:
119119

120120
.PHONY: db-clean
121121
db-clean:
122-
psql -h localhost -U postgres -c "drop database cpic; drop role web_anon; drop role cpic_api; drop role auth; drop role cpic;"
122+
psql -h ${PGHOST} -U postgres -c "drop database cpic; drop role web_anon; drop role cpic_api; drop role auth; drop role cpic;"
123123

124124

125125
.PHONY: import

0 commit comments

Comments
 (0)