add version

This commit is contained in:
Henning Jacobs
2017-01-14 17:54:27 +01:00
parent 6690100f6d
commit 43bf0040cb
6 changed files with 33 additions and 5 deletions

View File

@@ -1,7 +1,8 @@
.PHONY: clean test appjs docker push mock
IMAGE ?= hjacobs/kube-ops-view
TAG ?= latest
VERSION ?= 2017.0.dev1-$(shell git describe --tags --always --dirty)
TAG ?= $(VERSION)
GITHEAD = $(shell git rev-parse --short HEAD)
GITURL = $(shell git config --get remote.origin.url)
GITSTATU = $(shell git status --porcelain || echo "no changes")
@@ -19,7 +20,7 @@ appjs:
docker run -it -u $$(id -u) -v $$(pwd):/workdir -w /workdir/app node:7.4-alpine npm run build
docker: appjs scm-source.json
docker build -t "$(IMAGE):$(TAG)" .
docker build --build-arg "VERSION=$(VERSION)" -t "$(IMAGE):$(TAG)" .
push: docker
docker push "$(IMAGE):$(TAG)"