aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-10-15 14:45:03 +0000
committerHarald Welte <laforge@gnumonks.org>2017-10-15 14:45:03 +0000
commit6bce1e644f67ed80317ddc3c11b0d4f5ca5795bd (patch)
tree7f8b25f2b6c38a70ceb5812f18267ee9f6905a9a /make
parentf81dfad75fd8c0bba6e6cae63114d4937a839729 (diff)
Makefiles: Don't tag images with versions by default
Tagging each build with a version means we have to clean up lots of images manually. Let's change this to: * "make build" aka "make docker-build" only builds as $name:latest * "make docker-tag" will tag $name:latest as $name:$version This is racey, but then we don't really need version tags for the images so far anyway.
Diffstat (limited to 'make')
-rw-r--r--make/Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/make/Makefile b/make/Makefile
index 480c268..14d4c52 100644
--- a/make/Makefile
+++ b/make/Makefile
@@ -40,15 +40,17 @@ post-push:
docker-build: .release
- docker build -t $(IMAGE):$(VERSION) .
+ docker build -t $(IMAGE):latest .
@DOCKER_MAJOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f1) ; \
DOCKER_MINOR=$(shell docker -v | sed -e 's/.*version //' -e 's/,.*//' | cut -d\. -f2) ; \
+
+docker-tag: docker-build
if [ $$DOCKER_MAJOR -eq 1 ] && [ $$DOCKER_MINOR -lt 10 ] ; then \
- echo docker tag -f $(IMAGE):$(VERSION) $(IMAGE):latest ;\
- docker tag -f $(IMAGE):$(VERSION) $(IMAGE):latest ;\
+ echo docker tag -f $(IMAGE):latest $(IMAGE):$(VERSION) ;\
+ docker tag -f $(IMAGE):latest $(IMAGE):$(VERSION) ;\
else \
- echo docker tag $(IMAGE):$(VERSION) $(IMAGE):latest ;\
- docker tag $(IMAGE):$(VERSION) $(IMAGE):latest ; \
+ echo docker tag $(IMAGE):latest $(IMAGE):$(VERSION) ;\
+ docker tag $(IMAGE):latest $(IMAGE):$(VERSION) ; \
fi
.release: