From 81677a741540fe90d7c39217f91297baefb054d2 Mon Sep 17 00:00:00 2001 From: Paul Greenberg Date: Wed, 29 Apr 2020 18:41:27 -0400 Subject: [PATCH] amend Makefile --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 461a699..aa3e7af 100644 --- a/Makefile +++ b/Makefile @@ -93,6 +93,14 @@ gobgp: gobgp-down: @sudo systemctl stop gobgpd -tag: - @git tag -s "v$(APP_VERSION)" -m "v$(APP_VERSION)" +release: + @echo "Making release" + @if [ $(GIT_BRANCH) != "master" ]; then echo "cannot release to non-master branch $(GIT_BRANCH)" && false; fi + @git diff-index --quiet HEAD -- || ( echo "git directory is dirty, commit changes first" && false ) + @versioned -patch + @echo "Patched version" + @git add VERSION + @git commit -m "released v`cat VERSION | head -1`" + @git tag -a v`cat VERSION | head -1` -m "v`cat VERSION | head -1`" + @git push @git push --tags