Skip to content

Commit f2f164f

Browse files
author
Matthew
committed
fix(Makefile): use git rev for BUILD_TAG
1 parent fadc14c commit f2f164f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ include includes.mk
66
# - Kubernetes service, rc, pod, secret, volume names
77
SHORT_NAME := database
88

9-
# SemVer with build information is defined in the SemVer 2 spec, but Docker
10-
# doesn't allow +, so we use -.
11-
VERSION := 0.1.0-$(shell date "+%Y%m%d%H%M%S")
9+
BUILD_TAG := git-$(shell git rev-parse --short HEAD)
1210

1311
# Legacy support for DEV_REGISTRY, plus new support for DEIS_REGISTRY.
1412
DEIS_REGISTRY ?= ${DEV_REGISTRY}
@@ -18,7 +16,7 @@ IMAGE_PREFIX ?= deis/
1816
# Kubernetes-specific information for RC, Service, and Image.
1917
RC := manifests/deis-${SHORT_NAME}-rc.tmp.yaml
2018
SVC := manifests/deis-${SHORT_NAME}-service.yaml
21-
IMAGE := ${DEIS_REGISTRY}/${IMAGE_PREFIX}${SHORT_NAME}:${VERSION}
19+
IMAGE := ${DEIS_REGISTRY}/${IMAGE_PREFIX}${SHORT_NAME}:${BUILD_TAG}
2220

2321
all:
2422
@echo "Use a Makefile to control top-level building of the project."

0 commit comments

Comments
 (0)