tbls/justfile

35 lines
934 B
Plaintext
Raw Normal View History

2024-08-02 18:22:14 +00:00
# show all recipes
default:
just --list --unsorted
# compile binary
compile:
fennel --compile-binary src/main.fnl tbls /usr/local/lib/liblua.a /usr/local/include/lua5.4
# run test file
_test-story:
fennel test/story.test.fnl
# test main
_test-main:
for i in $(seq 1 10); do fennel src/main.fnl -i test/morpheme-word-epithet.txt -k name; done
# run all tests
test: _test-main _test-story
# bump version
bump:
#!/usr/local/bin/bash
currname=$(recsel doc/meta.rec -P version)
currnum=$(recsel doc/versions.rec -e "Name = '$currname'" -P Number)
nextnum=$((currnum + 1))
nextname=$(recsel doc/versions.rec -e "Number = $nextnum" -P Name)
echo "Bumping version from $currname to $nextname:"
recset doc/meta.rec -f version -s $nextname
recset doc/meta.rec -f updated -S $(gdate +'%Y-%m-%d')
recsel doc/meta.rec
# show full metadata
meta:
awk 'FNR==1{print ""}{print}' doc/*.rec | recsel -t meta -j version