diff options
-rwxr-xr-x | GNUmakefile | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile index 865b35e8..db87c5d2 100755 --- a/GNUmakefile +++ b/GNUmakefile | |||
@@ -2,7 +2,17 @@ SHELL=bash | |||
2 | TMP_FOLDER=/tmp | 2 | TMP_FOLDER=/tmp |
3 | RELEASE_FOLDER=wllbg-release | 3 | RELEASE_FOLDER=wllbg-release |
4 | 4 | ||
5 | ENV ?= prod | 5 | # ensure the ENV variable is well defined |
6 | ifeq ($(origin ENV), prod) | ||
7 | # all good ("prod" is a valid env) | ||
8 | else ifeq ($(origin ENV), dev) | ||
9 | # all good ("dev" is a valid env) | ||
10 | else ifeq ($(origin ENV), test) | ||
11 | # all good ("test" is a valid env) | ||
12 | else | ||
13 | # not good, force it to "prod" | ||
14 | override ENV = prod | ||
15 | endif | ||
6 | 16 | ||
7 | help: ## Display this help menu | 17 | help: ## Display this help menu |
8 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | 18 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |