From 98715877aa7801c50a11f2e721ce9c07299c7aca Mon Sep 17 00:00:00 2001 From: Novikov Sergey Date: Fri, 4 Jul 2025 10:05:52 +0200 Subject: [PATCH] Refactor Makefile --- Makefile | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index d312c93..4bbab1e 100644 --- a/Makefile +++ b/Makefile @@ -30,41 +30,11 @@ IMAGE = cytopia/terraform-docs FLAVOUR = latest FILE = Dockerfile -ifeq ($(strip $(VERSION)),0.1.0) - FILE = Dockerfile-0.11 -else - ifeq ($(strip $(VERSION)),0.1.1) - FILE = Dockerfile-0.11 - else - ifeq ($(strip $(VERSION)),0.2.0) - FILE = Dockerfile-0.11 - else - ifeq ($(strip $(VERSION)),0.3.0) - FILE = Dockerfile-0.11 - else - ifeq ($(strip $(VERSION)),0.4.0) - FILE = Dockerfile-0.11 - else - ifeq ($(strip $(VERSION)),0.4.5) - FILE = Dockerfile-0.11 - else - ifeq ($(strip $(VERSION)),0.5.0) - FILE = Dockerfile-0.11 - else - ifeq ($(strip $(VERSION)),0.6.0) - FILE = Dockerfile-0.11 - else - ifeq ($(strip $(VERSION)),0.7.0) - FILE = Dockerfile-0.11 - endif - endif - endif - endif - endif - endif - endif - endif +OVERRIDE_VERSIONS := 0.1.0 0.1.1 0.2.0 0.3.0 0.4.0 0.4.5 0.5.0 0.6.0 0.7.0 +ifeq ($(filter $(VERSION),$(OVERRIDE_VERSIONS)), $(VERSION)) + FILE = Dockerfile-0.11 endif + DIR = Dockerfiles # Building from master branch: Tag == 'latest'