From 849f9a4651e1b01e55e30c30cd1efdf0cea7342a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 2 Oct 2022 12:33:01 +0200 Subject: Adding release and upload targets to makefile. Signed-off-by: Daniel Baumann --- Makefile | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 85ce90f..61a6202 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,10 @@ SHELL := sh -e -PROJECT := progress-linux-metapackages +PROJECT := progress-linux +SOFTWARE := progress-linux-metapackages + +VERSION := $(shell cat VERSION.txt) all: build @@ -72,3 +75,27 @@ uninstall-man: done reinstall: clean uninstall build install + +distclean: clean + rm -rf $(SOFTWARE)-$(VERSION) + +release: distclean + git commit -a -s -S -m 'Releasing version $(VERSION).' || true + git tag -s -m 'Tagging version $(VERSION).' v$(VERSION) || true + + mkdir -p $(SOFTWARE)-$(VERSION) + find . -mindepth 1 -maxdepth 1 -and -not -name ".git*" -and -not -name debian -and -not -name $(SOFTWARE)-$(VERSION) -exec cp \-a {} $(SOFTWARE)-$(VERSION) \; + + for FORMAT in xz lzip; \ + do \ + EXTENSION=$$(echo $${FORMAT} | cut -b-2); \ + tar --$${FORMAT} -cf ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION} $(SOFTWARE)-$(VERSION); \ + sha512sum ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION} > ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION}.sha512; \ + gpg --default-key 0x3E6CA28DAAF8DD14 --armor -b ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION}; \ + mv ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION}.asc ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION}.sig; \ + done + + rm -rf $(SOFTWARE)-$(VERSION) + +upload: + scp ../$(SOFTWARE)-$(VERSION).* get.progress-linux.org:/srv/get.progress-linux.org/packages/$(SOFTWARE)/upstream -- cgit v1.2.3