aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Tom Willemse2022-03-23 19:05:29 -0700
committerGravatar Tom Willemse2022-03-23 19:05:29 -0700
commitba5d9c29f3defd28c5973d257a86f910deb78986 (patch)
tree7478652177e7a39cbfc575b83cd68f6dfe0aa808 /Makefile
parent39ba8e49d69c2abc904e28c8cdfeb782e3c065fe (diff)
downloadtekuti-el-ba5d9c29f3defd28c5973d257a86f910deb78986.tar.gz
tekuti-el-ba5d9c29f3defd28c5973d257a86f910deb78986.zip
Set up automated builds on Sourcehut
This builds both a package archive and the readme.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4cbef87
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,29 @@
+SITE := ryuslash.srht.site
+CURL := curl
+
+.PHONY: stamp-version
+
+stamp-version:
+ version=$$(git log -1 --format="%cd" --date=format:%Y.%m%d.%H%M); \
+ sed -i "s/\(;; Version\): .*/\1: $$version/" tekuti.el
+
+package:
+ mkdir -p dist
+ emacs --batch --quick \
+ --eval "(require 'package-x)" \
+ --eval "(setq package-archive-upload-base \"dist\")" \
+ --eval "(package-upload-file \"tekuti.el\")"
+ cd dist && tar cvzf ../tekuti.tar.gz .
+
+README.html: README.org
+ emacs --batch --quick \
+ --eval "(require 'ox-html)" \
+ --visit $< \
+ --eval "(org-html-export-to-html nil nil nil t)" \
+
+upload:
+ $(CURL) -f "https://pages.sr.ht/publish/$(SITE)/tekuti/elpa/" \
+ -Fcontent=@tekuti.tar.gz
+
+clean:
+ rm -rfv README.html dist tekuti.tar.gz