summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-06-14 12:59:03 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-07-04 13:35:23 +0000
commit261e090968e64b8629071b5a11dfe4ce415c26b1 (patch)
tree54fd6ed13b3796293904465ee7a8143844a22508
parentReleasing version 20220605. (diff)
downloadcompute-tools-261e090968e64b8629071b5a11dfe4ce415c26b1.tar.xz
compute-tools-261e090968e64b8629071b5a11dfe4ce415c26b1.zip
Adding release related targets in Makefile.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rw-r--r--Makefile26
1 files changed, 25 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 95524db..bdb8f26 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,8 @@ PROGRAM = container
SCRIPTS = bin/* libexec/*/*
+VERSION := $(shell cat VERSION.txt)
+
all: build
test:
@@ -226,6 +228,28 @@ clean:
rm -f README.txt
-distclean:
+distclean: clean
+ rm -rf service-tools-$(VERSION)
reinstall: uninstall install
+
+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 0xB62C61A10B93195F --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.open-infrastructure.net:/srv/get.open-infrastructure.net/software/$(SOFTWARE)/upstream