@@ -3,6 +3,7 @@ CAT_CMD=$(if $(filter $(OS),Windows_NT),type,cat)
33RELEASE_VER: =
44CURRENT_DIR =$(shell pwd)
55GIT_BRANCH: =$(shell git symbolic-ref --short HEAD 2>&1 | grep -v fatal)
6+
67# define the GO_BUILD_ARGS if you need to pass additional arguments to the go build
78GO_BUILD_ARGS? =
89
@@ -22,16 +23,7 @@ CLIENT_GEN ?= $(LOCALBIN)/client-gen
2223LISTER_GEN ?= $(LOCALBIN ) /lister-gen
2324INFORMER_GEN ?= $(LOCALBIN ) /informer-gen
2425
25- # Reset branch name if this a Travis CI environment
26- ifneq ($(strip $(TRAVIS_BRANCH ) ) ,)
27- GIT_BRANCH:=${TRAVIS_BRANCH}
28- endif
29-
3026TAG: =$(shell echo "")
31- # Check for git repository id sent by Travis-CI
32- ifneq ($(strip $(git_repository_id ) ) ,)
33- TAG:=${TAG}${git_repository_id}-
34- endif
3527
3628# Check for current branch name and update 'RELEASE_VER' and 'TAG'
3729ifneq ($(strip $(GIT_BRANCH ) ) ,)
@@ -184,7 +176,6 @@ push-images: verify-tag-name
184176ifeq ($(strip $(quay_repository ) ) ,)
185177 $(info No registry information provided. To push images to a docker registry please set)
186178 $(info environment variables: quay_repository, quay_token, and quay_id. Environment)
187- $(info variables do not need to be set for github Travis CICD.)
188179else
189180 $(info Log into quay)
190181 docker login quay.io -u ${quay_id} --password ${quay_token}
193184 $(info Push the docker image to registry)
194185 docker push ${quay_repository}/mcad-controller:${TAG}
195186ifeq ($(strip $(git_repository_id ) ) ,main)
196- $(info Update the `latest ` tag when built from `main`)
187+ $(info Update the `dev ` tag when built from `main`)
197188 docker tag mcad-controller:${TAG} ${quay_repository}/mcad-controller:latest
198189 docker push ${quay_repository}/mcad-controller:latest
199190endif
0 commit comments