diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2020-01-14 14:30:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-14 14:30:17 +0100 |
commit | 913c3bc7aa9405a3e125b279951ceb58c57cbd81 (patch) | |
tree | 6d92d796e4285edcf336743083e2cba3bfef562e | |
parent | 7dc4cbe70fbc31c026e961bc758019029405a629 (diff) | |
parent | 29f5515959de45a7f2971756e3563995c425c2c2 (diff) | |
download | wallabag-913c3bc7aa9405a3e125b279951ceb58c57cbd81.tar.gz wallabag-913c3bc7aa9405a3e125b279951ceb58c57cbd81.tar.zst wallabag-913c3bc7aa9405a3e125b279951ceb58c57cbd81.zip |
Merge pull request #4249 from wallabag/fix/env-not-well-defined
Ensure ENV is well defined when using make
-rwxr-xr-x | GNUmakefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile index 865b35e8..837f7103 100755 --- a/GNUmakefile +++ b/GNUmakefile | |||
@@ -2,7 +2,14 @@ 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 | AVAILABLE_ENV := prod dev test | ||
7 | ifneq ($(filter $(ENV),$(AVAILABLE_ENV)),) | ||
8 | # all good | ||
9 | else | ||
10 | # not good, force it to "prod" | ||
11 | override ENV = prod | ||
12 | endif | ||
6 | 13 | ||
7 | help: ## Display this help menu | 14 | 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}' | 15 | @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |