summarylogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAlfonso² Peterssen2021-01-31 21:54:03 +0100
committerAlfonso² Peterssen2021-01-31 21:54:03 +0100
commit786239634b2e8438890fab53eb2f552de10d5c84 (patch)
treec8e80525aae740de2c82d51baed47a3c9fca6b5a /Makefile
parent6282ff5fb98f14d851684dcad7e473bd06656d4b (diff)
downloadaur-786239634b2e8438890fab53eb2f552de10d5c84.tar.gz
Automate jbang version updates.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..7d74ea108c70
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,31 @@
+# Update the checksums and build the package
+all:
+ updpkgsums
+ makepkg --printsrcinfo > .SRCINFO
+ makepkg -sr
+
+# Same as all, but will install it to the local system as well
+install:
+ updpkgsums
+ makepkg --printsrcinfo > .SRCINFO
+ makepkg -sri
+
+# Updates PKGBUILD with the latest version and build the package
+update:
+ sed 's/^pkgver=.*$$/pkgver=$(shell $(MAKE) versions | head -n 1)/' -i PKGBUILD
+ sed 's/^pkgrel=.*$$/pkgrel=1/' -i PKGBUILD
+ $(MAKE)
+
+# List the versions available on GitHub
+versions:
+ @curl -s https://api.github.com/repos/jbangdev/jbang/releases | jq -r ".[] | .tag_name | ltrimstr(\"v\")"
+
+# Remove the files downloaded and created in the build process
+clean:
+ rm -rf pkg src jbang-*.tar jbang-*.pkg.tar.zst LICENSE
+
+publish:
+ git add .
+ git commit -m "Update to version $(shell $(MAKE) versions | head -n 1)."
+ git push
+ git push aur master