add version
This commit is contained in:
5
Makefile
5
Makefile
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user