From d16adbbfdb3cae8e1de5c778a1d7149543121d7e Mon Sep 17 00:00:00 2001 From: pedro Date: Wed, 6 Mar 2024 18:54:20 +0100 Subject: [PATCH] bugfix makefile when branch contains / char --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c968241..a66a47e 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,10 @@ devicehub_image := ${project}/devicehub:${devicehub_tag} # idhub image tag #### -idhub_branch := `git -C IdHub branch --show-current` +# src https://stackoverflow.com/questions/33479645/substitute-character-in-makefile-variable-after-evaluation +idhub_branch_raw := $(shell git -C IdHub branch --show-current) +idhub_branch := $(subst /,-,$(idhub_branch_raw)) + idhub_commit := `git -C IdHub log -1 --format=%h` idhub_tag := ${idhub_branch}__${idhub_commit} idhub_tag := latest