Skip to content

Commit 04caa2a

Browse files
author
childish-sambino
authored
chore: use Docker 'rc' tag for release candidate images (#168)
1 parent 79ada45 commit 04caa2a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ golint: govet
2525
golangci-lint run
2626

2727
API_DEFINITIONS_SHA=$(shell git log --oneline | grep Regenerated | head -n1 | cut -d ' ' -f 5)
28+
CURRENT_TAG=$(shell [[ "${GITHUB_TAG}" == *"-rc"* ]] && echo "rc" || echo "latest")
2829
docker-build:
2930
docker build -t twilio/twilio-go .
3031
docker tag twilio/twilio-go twilio/twilio-go:${GITHUB_TAG}
3132
docker tag twilio/twilio-go twilio/twilio-go:apidefs-${API_DEFINITIONS_SHA}
32-
docker tag twilio/twilio-go twilio/twilio-go:latest
33+
docker tag twilio/twilio-go twilio/twilio-go:${CURRENT_TAG}
3334

3435
docker-push:
3536
docker push twilio/twilio-go:${GITHUB_TAG}
3637
docker push twilio/twilio-go:apidefs-${API_DEFINITIONS_SHA}
37-
docker push twilio/twilio-go:latest
38+
docker push twilio/twilio-go:${CURRENT_TAG}
3839

3940
GO_DIRS = $(shell go list ./... | grep -v /rest/ | grep -v /form )
4041
cover:

0 commit comments

Comments
 (0)