summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-02 10:33:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-02 10:44:33 +0000
commit849f9a4651e1b01e55e30c30cd1efdf0cea7342a (patch)
tree42ef8edd8de72bcfddeb196f0426b4a0550807a2
parentUpdating copyright headers for 2022. (diff)
downloadprogress-linux-metapackages-849f9a4651e1b01e55e30c30cd1efdf0cea7342a.tar.xz
progress-linux-metapackages-849f9a4651e1b01e55e30c30cd1efdf0cea7342a.zip
Adding release and upload targets to makefile.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--Makefile29
1 files changed, 28 insertions, 1 deletions
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