summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile18
1 files changed, 17 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4f09e42a93f..0c62cf7dbcb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,20 @@
-.PHONY: post clean
+.PHONY: post clean upgrade versions
+
+LATEST_VER := $(shell curl -s https://github.com/CryptoGraphics/VerthashMiner/releases/latest | perl -pe 's!.*/tag/(.+?)".*!$$1!')
+
+versions:
+ @echo "Current version:"
+ @grep '^pkgver' PKGBUILD | sed 's/.*=/ /'
+ @echo "Latest version:"
+ @echo " $(LATEST_VER)"
+
+upgrade:
+ perl -pi -e 's/^pkgver=.+/pkgver=$(LATEST_VER)/' PKGBUILD
+ bash -c 'perl -pi -e "s/^sha256sums=.+/$$(makepkg -g)/" PKGBUILD'
+ make post
+ git add .SRCINFO PKGBUILD
+ git commit -m "Upgrade to $(LATEST_VER)" .SRCINFO PKGBUILD
+ git show
post:
makepkg --verifysource -f