From 4544542b43719676cf6e92d99eeb485315f685e4 Mon Sep 17 00:00:00 2001 From: Matt Robinson Date: Tue, 21 May 2019 10:36:09 -0400 Subject: [PATCH] I think this fixes the weird '-heads-' in the version tags (#2010) --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 710b589af..129b9867d 100644 --- a/Makefile +++ b/Makefile @@ -2,16 +2,16 @@ GO_VERSION ?= 1.12.5 GOOS ?= linux GOARCH ?= amd64 COMPOSE_PROJECT_NAME := ${TAG}-$(shell git rev-parse --abbrev-ref HEAD) -BRANCH := $(shell git rev-parse --abbrev-ref HEAD | sed "s!/!-!g") -ifeq (${BRANCH},master) +BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD | sed "s!/!-!g") +ifeq (${BRANCH_NAME},master) TAG := $(shell git rev-parse --short HEAD)-go${GO_VERSION} TRACKED_BRANCH := true LATEST_TAG := latest else -TAG := $(shell git rev-parse --short HEAD)-${BRANCH}-go${GO_VERSION} -ifneq (,$(findstring release-,$(BRANCH))) +TAG := $(shell git rev-parse --short HEAD)-${BRANCH_NAME}-go${GO_VERSION} +ifneq (,$(findstring release-,$(BRANCH_NAME))) TRACKED_BRANCH := true -LATEST_TAG := ${BRANCH}-latest +LATEST_TAG := ${BRANCH_NAME}-latest endif endif CUSTOMTAG ?=