summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 16 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4905e69..e445c92 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,21 @@
-.PHONY: all install clean
+VERSION := $(shell cat VERSION)
+ARCHIVE := sysz-$(VERSION).tar.gz
+.PHONY: all install clean release
all: clean README.md VERSION PKGBUILD
- sed -i -e "s/^SYSZ_VERSION=.*/SYSZ_VERSION=`cat VERSION`/" sysz
- sed -i -e "s/^pkgver=.*/pkgver=`cat VERSION`/" PKGBUILD
+ sed -i -e "s/^SYSZ_VERSION=.*/SYSZ_VERSION=$(VERSION)/" sysz
+ sed -i -e "s/^pkgver=.*/pkgver=$(VERSION)/" PKGBUILD
+
+release: all
+ git commit -am 'Release $(VERSION)'
+ git tag $(VERSION)
+ git push origin $(VERSION)
+ git archive --format=tar.gz -o $(ARCHIVE) --prefix sysz-$(VERSION)/ HEAD
+ sed -i -e "s/^sha256sum=.*/sha256sum=('$(shell sha256sum $(ARCHIVE))')/" PKGBUILD
+ makepkg
+ git commit -am 'Update PKGBUILD'
+ git push orgin master
+
clean:
/bin/rm -f README.md