diff options
| author | eltrac <hi@eltr.ac> | 2026-04-02 11:48:46 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-04-02 11:48:46 +0800 |
| commit | b0984fe2fb048cfc6e3ba97782bc8a038783a88f (patch) | |
| tree | 5c445736ea6b871f7d2c8289b517d6539355884e /build.sh | |
| parent | bc2f34e733a95d697ec301eddfaca55c9f0e1cca (diff) | |
refactor(build): rewrite build script in Clojure with Babashka
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/build.sh b/build.sh deleted file mode 100755 index f5fdface..00000000 --- a/build.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -# to build this site, you must have: git, pnpm, go and hugo - -echo "_______ _______ _______ ______ _______ _______ _______ _______ _______ " -echo "( ____ \( ____ \( ____ \( __ \ ( ____ \( ___ )( ____ )( ____ )( ___ )" -echo "| ( \/| ( \/| ( \/| ( \ )| ( \/| ( ) || ( )|| ( )|| ( ) |" -echo "| | | (__ | (__ | | ) || (__ | (___) || (____)|| (____)|| | | |" -echo "| | ____ | __) | __) | | | || __) | ___ || _____)| __)| | | |" -echo "| | \_ )| ( | ( | | ) || ( | ( ) || ( | (\ ( | | | |" -echo "| (___) || (____/\| (____/\| (__/ )| (____/\| ) ( || ) | ) \ \__| (___) |" -echo "(_______)(_______/(_______/(______/ (_______/|/ \||/ |/ \__/(_______)" - -# ========= Pull =========== # -echo "\n\n1️⃣ Pulling changes from remote.\n" -git pull - -# ======= pre-build ========= # -echo "\n\n2️⃣ Pre-Build\n" -pnpm build:uno:prod # build UnoCSS - -# check and build Go binaries if needed -mkdir -p bin - -# List of Go programs to build and execute -go_programs="extract_highlights get_external_link_rank get_internal_link_graph" - -for program in $go_programs; do - if [ ! -f "bin/$program" ]; then - echo "Building $program..." - cd scripts && go build -o "../bin/$program" "$program.go" && cd .. - else - echo "$program binary already exists in bin/" - fi - - # Execute the binary - echo "Running $program..." - "./bin/$program" -done - -# build hugo site -echo "\n\n3️⃣ Hugo!\n" -rm -rf ./public # clear old output -hugo --gc --minify - -# post-build -echo "\n\n4️⃣ Post-Build\n" -pnpm pagefind --site public # indexing pagefind -pnpm wm public/index.xml --limit 1 --send # send webmention |
