From 677016ca529dd03671582fcb00a84eac52d784d6 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Wed, 25 Mar 2026 15:55:46 +1100 Subject: [PATCH] Auto-push tag and create Gitea release on make patch/minor/major --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e44aeb7..5812135 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ BINARY := node-lookup VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo dev) GOFLAGS := -ldflags="-s -w -X main.version=$(VERSION)" -.PHONY: all build test lint clean install patch minor major +.PHONY: all build test lint clean install patch minor major _release all: build @@ -31,12 +31,16 @@ _PAT := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f3) patch: @NEW=v$(_MAJ).$(_MIN).$(shell expr $(_PAT) + 1); \ - git tag $$NEW && echo "Tagged $$NEW" + git tag $$NEW && echo "Tagged $$NEW" && $(MAKE) _release TAG=$$NEW minor: @NEW=v$(_MAJ).$(shell expr $(_MIN) + 1).0; \ - git tag $$NEW && echo "Tagged $$NEW" + git tag $$NEW && echo "Tagged $$NEW" && $(MAKE) _release TAG=$$NEW major: @NEW=v$(shell expr $(_MAJ) + 1).0.0; \ - git tag $$NEW && echo "Tagged $$NEW" + git tag $$NEW && echo "Tagged $$NEW" && $(MAKE) _release TAG=$$NEW + +_release: + git push origin $(TAG) + tea releases create --tag $(TAG) --title $(TAG)