From f047389da98868f05baaec877c4ac269212e4fbd Mon Sep 17 00:00:00 2001 From: Klagarge Date: Sat, 10 Oct 2026 20:29:36 +0200 Subject: [PATCH] chore: bootstrap pinned toolchain Assisted-by: Delta:zai-glm-5.3 --- Justfile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Justfile diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..b79526a --- /dev/null +++ b/Justfile @@ -0,0 +1,41 @@ +calepin-version := "0.0.61" +typst-version := "0.15.1" + +# Print available recipes +default: + @just --list + +# Download and verify the pinned toolchain +tools: + mkdir -p tools + cd tools && \ + if [ ! -f calepin ]; then \ + curl -sL "https://github.com/vincentarelbundock/calepin/releases/download/v{{calepin-version}}/calepin-x86_64-unknown-linux-gnu.tar.xz" -o calepin-x86_64-unknown-linux-gnu.tar.xz; \ + curl -sL "https://github.com/vincentarelbundock/calepin/releases/download/v{{calepin-version}}/calepin-x86_64-unknown-linux-gnu.tar.xz.sha256" -o calepin-x86_64-unknown-linux-gnu.tar.xz.sha256; \ + sha256sum -c calepin-x86_64-unknown-linux-gnu.tar.xz.sha256; \ + tar -xf calepin-x86_64-unknown-linux-gnu.tar.xz --strip-components=1 calepin-x86_64-unknown-linux-gnu/calepin; \ + rm calepin-x86_64-unknown-linux-gnu.tar.xz calepin-x86_64-unknown-linux-gnu.tar.xz.sha256; \ + fi + cd tools && \ + if [ ! -f typst ]; then \ + curl -sL "https://github.com/typst/typst/releases/download/v{{typst-version}}/typst-x86_64-unknown-linux-musl.tar.xz" -o typst.tar.xz; \ + tar -xf typst.tar.xz --strip-components=1 typst-x86_64-unknown-linux-musl/typst; \ + rm typst.tar.xz; \ + fi + +# Build the site +build: + PATH="$$PWD/tools:$$PATH" calepin build + +# Preview the site locally +preview: + PATH="$$PWD/tools:$$PATH" calepin serve + +# Watch for changes and preview +watch: + PATH="$$PWD/tools:$$PATH" calepin watch --serve + +# Clean the output directory +clean: + rm -rf public tools +