Set up automated builds on Sourcehut
This builds both a package archive and the readme.
This commit is contained in:
parent
39ba8e49d6
commit
ba5d9c29f3
5 changed files with 86 additions and 0 deletions
17
.build/pages.yml
Normal file
17
.build/pages.yml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
image: alpine/latest
|
||||||
|
oauth: pages.sr.ht/PAGES:RW
|
||||||
|
packages:
|
||||||
|
- make
|
||||||
|
- emacs-nox
|
||||||
|
- git
|
||||||
|
tasks:
|
||||||
|
- stamp-version: |
|
||||||
|
cd tekuti-el
|
||||||
|
make stamp-version
|
||||||
|
- package: |
|
||||||
|
cd tekuti-el
|
||||||
|
make package
|
||||||
|
- upload: |
|
||||||
|
cd tekuti-el
|
||||||
|
acurl -f "https://pages.sr.ht/publish/ryuslash.srht.site/pcomplete-p4/elpa/" \
|
||||||
|
-Fcontent=@pcomplete-p4.tar.gz
|
20
.build/readme.yml
Normal file
20
.build/readme.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
image: alpine/latest
|
||||||
|
packages:
|
||||||
|
- make
|
||||||
|
- emacs-nox
|
||||||
|
secrets:
|
||||||
|
- 71a00305-bdc9-4108-84a0-2d42d5f824d6
|
||||||
|
tasks:
|
||||||
|
- build: |
|
||||||
|
cd tekuti-el
|
||||||
|
make README.html
|
||||||
|
- readme: |
|
||||||
|
cd tekuti-el
|
||||||
|
set +x
|
||||||
|
curl --fail-with-body \
|
||||||
|
-H "Content-Type: text/html" \
|
||||||
|
-H "Authorization: Bearer $(cat ~/.pcomplete-p4-auth)" \
|
||||||
|
-XPUT \
|
||||||
|
--data-binary @README.html \
|
||||||
|
'https://git.sr.ht/api/repos/tekuti-el/readme' \
|
||||||
|
&& echo "README set"
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/dist/
|
||||||
|
/*.tar.gz
|
||||||
|
/README.html
|
29
Makefile
Normal file
29
Makefile
Normal file
|
@ -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
|
17
README.org
Normal file
17
README.org
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#+TITLE: tekuti-el
|
||||||
|
#+SUBTITLE: Emacs interface to tekuti
|
||||||
|
#+OPTIONS: num:nil
|
||||||
|
|
||||||
|
This project is meant to help make posting and maintaining blog posts from Emacs to [[https://wingolog.org/projects/tekuti/][tekuti]].
|
||||||
|
|
||||||
|
* Installation
|
||||||
|
|
||||||
|
If you want to try out this project, you can install it in Emacs through ELPA by adding the development archive for this project into your =package-archives=:
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(add-to-list 'package-archives
|
||||||
|
'("tekuti-el"
|
||||||
|
. "https://ryuslash.srht.site/tekuti/elpa/"))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Then run =list-packages= in Emacs and the package should pop up.
|
Loading…
Reference in a new issue