aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-06-03 15:53:03 +0000
committerHarald Welte <laforge@gnumonks.org>2018-06-03 15:54:34 +0000
commitc400005f38c5a6f1933e13d85827d3e8e14bf9da (patch)
tree779502d02c522b5366dbd207e50e76ee4fa64ab8 /make
parent9e631757bed8d45cc493f526bfab629f698f8dbf (diff)
Makefile: get rid of entire git tagging logic
Diffstat (limited to 'make')
-rw-r--r--make/Makefile25
1 files changed, 3 insertions, 22 deletions
diff --git a/make/Makefile b/make/Makefile
index 91f1ded..231b685 100644
--- a/make/Makefile
+++ b/make/Makefile
@@ -21,11 +21,10 @@ RELEASE_SUPPORT := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/.mak
IMAGE?=$(REGISTRY_HOST)/$(NAME)
VERSION?=$(shell . $(RELEASE_SUPPORT) ; getRelease)
-TAG?=$(shell . $(RELEASE_SUPPORT); getTag)
SHELL=/bin/bash
-.PHONY: pre-build docker-build post-build build release patch-release minor-release major-release tag check-status check-release showver \
+.PHONY: pre-build docker-build post-build build release patch-release minor-release major-release tag showver \
push do-push post-push
build: pre-build docker-build post-build
@@ -44,7 +43,7 @@ docker-build: .release
@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
+tag: docker-build
if [ $$DOCKER_MAJOR -eq 1 ] && [ $$DOCKER_MINOR -lt 10 ] ; then \
echo docker tag -f $(IMAGE):latest $(IMAGE):$(VERSION) ;\
docker tag -f $(IMAGE):latest $(IMAGE):$(VERSION) ;\
@@ -55,12 +54,11 @@ docker-tag: docker-build
.release:
@echo "release=0.0.0" > .release
- @echo "tag=$(NAME)-0.0.0" >> .release
@echo INFO: .release created
@cat .release
-release: check-status check-release build push
+release: build push
push: do-push post-push
@@ -93,22 +91,5 @@ major-release: tag-major-release release
@echo $(VERSION)
-tag: TAG=$(shell . $(RELEASE_SUPPORT); getTag $(VERSION))
-tag: check-status
- @. $(RELEASE_SUPPORT) ; ! tagExists $(TAG) || (echo "ERROR: tag $(TAG) for version $(VERSION) already tagged in git" >&2 && exit 1) ;
- @. $(RELEASE_SUPPORT) ; setRelease $(VERSION)
- git add .release
- git commit -m "bumped to version $(VERSION)" ;
- git tag $(TAG) ;
- @[ -n "$(shell git remote -v)" ] && git push --tags
-
-check-status:
- @. $(RELEASE_SUPPORT) ; ! hasChanges || (echo "ERROR: there are still outstanding changes" >&2 && exit 1) ;
-
-check-release: .release
- @. $(RELEASE_SUPPORT) ; tagExists $(TAG) || (echo "ERROR: version not yet tagged in git. make [minor,major,patch]-release." >&2 && exit 1) ;
- @. $(RELEASE_SUPPORT) ; ! differsFromRelease $(TAG) || (echo "ERROR: current directory differs from tagged $(TAG). make [minor,major,patch]-release." ; exit 1)
-
-
run:
docker run $(RUN_ARGS) -it $(IMAGE)