From 29973669ae7689206c0bcfc8b18061d6adec4153 Mon Sep 17 00:00:00 2001 From: zstadler Date: Mon, 4 May 2020 20:28:23 +0300 Subject: [PATCH] Warning-check for `make import-sql` (#846) Always check `make import-sql` for warnings. Not only when invoked by `quickstart.sh`. --- Makefile | 3 ++- quickstart.sh | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5e363594..a1da3675 100644 --- a/Makefile +++ b/Makefile @@ -167,7 +167,8 @@ import-borders: db-start .PHONY: import-sql 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 ifneq ($(wildcard data/docker-compose-config.yml),) diff --git a/quickstart.sh b/quickstart.sh index 01083438..0d372ce9 100755 --- a/quickstart.sh +++ b/quickstart.sh @@ -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" # If the output contains a WARNING, stop further processing # Adapted from https://unix.stackexchange.com/questions/307562 -make import-sql | \ - awk -v s=": WARNING:" '$0~s{print; print "\n*** WARNING detected, aborting"; exit(1)} 1' +make import-sql echo " " echo "-------------------------------------------------------------------------------------"