From c7d627165f4d399465c84a7f4a6a7805a526fbe4 Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Sun, 28 May 2023 01:15:48 +0200 Subject: chore(release): adjust Makefile for new release schema Ask for the next release version and automatically create a signed tag. Furthermore add a simple release target to call glab for uploading the required artifacts. --- Makefile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 3092b36..8733ecd 100644 --- a/Makefile +++ b/Makefile @@ -145,19 +145,20 @@ uninstall: $(DESTDIR)$(DATADIR)/pacman.conf.d \ $(DESTDIR)$(DATADIR) -TODAY=$(shell date +"%Y%m%d") tag: - @sed -E "s|^V=[0-9]{8}|V=$(TODAY)|" -i Makefile - @git commit --gpg-sign --message "Version $(TODAY)" Makefile - @git tag --sign --message "Version $(TODAY)" $(TODAY) + @echo "current version: v$(V)" + @read -r -p "tag version: v" VERSION && \ + sed -E "s|^V=.+|V=$$VERSION|" -i Makefile && \ + git commit --gpg-sign --message "chore(release): version v$$VERSION" Makefile && \ + git tag --sign --message "Version v$$VERSION" v$$VERSION + +release: dist + glab release create v$(RELEASE) devtools-$(RELEASE).tar.gz* dist: - git archive --format=tar --prefix=devtools-$(V)/ $(V) | gzip > devtools-$(V).tar.gz + git archive --format=tar --prefix=devtools-$(V)/ v$(V) | gzip > devtools-$(V).tar.gz gpg --detach-sign --use-agent devtools-$(V).tar.gz -upload: - scp devtools-$(V).tar.gz devtools-$(V).tar.gz.sig repos.archlinux.org:/srv/ftp/other/devtools/ - check: $(BINPROGS_SRC) $(LIBRARY_SRC) contrib/completion/bash/devtools.in config/makepkg/x86_64.conf contrib/makepkg/PKGBUILD.proto shellcheck $^ -- cgit v1.2.3-70-g09d2