tbls/justfile

43 lines
1.0 KiB
Plaintext
Raw Permalink 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
2024-08-03 23:09:10 +00:00
# install vim plugin
install-plugin:
cp -r vim-tbls/* ~/.config/nvim
# install binary
install-binary: compile
cp tbls ~/bin