]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Improve check by using list 4249/head
authorJeremy Benoist <jeremy.benoist@gmail.com>
Mon, 13 Jan 2020 14:58:59 +0000 (15:58 +0100)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Mon, 13 Jan 2020 14:58:59 +0000 (15:58 +0100)
See https://stackoverflow.com/a/27335439/569101

GNUmakefile

index db87c5d210ee114d18a26dda018e728765912bf8..837f7103fd94cdeb6d0ae880384d680aa8c2fb2d 100755 (executable)
@@ -3,12 +3,9 @@ TMP_FOLDER=/tmp
 RELEASE_FOLDER=wllbg-release
 
 # ensure the ENV variable is well defined
-ifeq ($(origin ENV), prod)
-       # all good ("prod" is a valid env)
-else ifeq ($(origin ENV), dev)
-       # all good ("dev" is a valid env)
-else ifeq ($(origin ENV), test)
-       # all good ("test" is a valid env)
+AVAILABLE_ENV := prod dev test
+ifneq ($(filter $(ENV),$(AVAILABLE_ENV)),)
+       # all good
 else
        # not good, force it to "prod"
        override ENV = prod