tekuti-el/Makefile
Tom Willemse ba5d9c29f3 Set up automated builds on Sourcehut
This builds both a package archive and the readme.
2022-03-23 19:05:29 -07:00

29 lines
756 B
Makefile

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