Warning-check for make import-sql (#846)

Always check `make import-sql` for warnings. Not only when invoked by `quickstart.sh`.
This commit is contained in:
zstadler 2020-05-04 20:28:23 +03:00 committed by GitHub
parent 68911900c9
commit 29973669ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -167,7 +167,8 @@ import-borders: db-start
.PHONY: import-sql .PHONY: import-sql
import-sql: db-start all import-sql: db-start all
$(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools import-sql $(DOCKER_COMPOSE) run $(DC_OPTS) openmaptiles-tools import-sql | \
awk -v s=": WARNING:" '$$0~s{print; print "\n*** WARNING detected, aborting"; exit(1)} 1'
.PHONY: generate-tiles .PHONY: generate-tiles
ifneq ($(wildcard data/docker-compose-config.yml),) ifneq ($(wildcard data/docker-compose-config.yml),)

View File

@ -222,8 +222,7 @@ echo "====> : Start SQL postprocessing: ./build/sql/* -> PostgreSQL "
echo " : Source code: https://github.com/openmaptiles/openmaptiles-tools/blob/master/bin/import-sql" echo " : Source code: https://github.com/openmaptiles/openmaptiles-tools/blob/master/bin/import-sql"
# If the output contains a WARNING, stop further processing # If the output contains a WARNING, stop further processing
# Adapted from https://unix.stackexchange.com/questions/307562 # Adapted from https://unix.stackexchange.com/questions/307562
make import-sql | \ make import-sql
awk -v s=": WARNING:" '$0~s{print; print "\n*** WARNING detected, aborting"; exit(1)} 1'
echo " " echo " "
echo "-------------------------------------------------------------------------------------" echo "-------------------------------------------------------------------------------------"