2024-08-05 04:03:38 +00:00
|
|
|
set quiet
|
|
|
|
|
2024-08-02 18:22:14 +00:00
|
|
|
# show all recipes
|
|
|
|
default:
|
|
|
|
just --list --unsorted
|
|
|
|
|
|
|
|
# compile binary
|
2024-08-05 04:03:38 +00:00
|
|
|
[group('build')]
|
2024-08-02 18:22:14 +00:00
|
|
|
compile:
|
|
|
|
fennel --compile-binary src/main.fnl tbls /usr/local/lib/liblua.a /usr/local/include/lua5.4
|
2024-08-05 04:03:38 +00:00
|
|
|
alias build := compile
|
|
|
|
|
|
|
|
# install all
|
|
|
|
[group('install')]
|
|
|
|
install: install-plugin install-binary
|
|
|
|
|
|
|
|
# install vim plugin
|
|
|
|
[group('install')]
|
|
|
|
install-plugin:
|
|
|
|
cp -r vim-tbls/* ~/.config/nvim
|
|
|
|
|
|
|
|
# install binary
|
|
|
|
[group('install')]
|
|
|
|
install-binary: compile
|
|
|
|
cp tbls ~/bin
|
|
|
|
|
|
|
|
# run all tests
|
|
|
|
[group('test')]
|
|
|
|
test: test-main test-story
|
2024-08-02 18:22:14 +00:00
|
|
|
|
|
|
|
# run test file
|
2024-08-05 04:03:38 +00:00
|
|
|
[group('test')]
|
|
|
|
test-story:
|
2024-08-02 18:22:14 +00:00
|
|
|
fennel test/story.test.fnl
|
|
|
|
|
|
|
|
# test main
|
2024-08-05 04:03:38 +00:00
|
|
|
[group('test')]
|
|
|
|
test-main:
|
2024-08-02 18:22:14 +00:00
|
|
|
for i in $(seq 1 10); do fennel src/main.fnl -i test/morpheme-word-epithet.txt -k name; done
|
|
|
|
|
2024-08-05 04:03:38 +00:00
|
|
|
# build all docs
|
|
|
|
[group('docs')]
|
|
|
|
docs: deps readme
|
|
|
|
|
|
|
|
# build readme
|
|
|
|
[group('docs')]
|
|
|
|
readme:
|
|
|
|
m4 doc/src/readme.m4 > README.md
|
|
|
|
|
|
|
|
# create dependency graph
|
|
|
|
[group('docs')]
|
|
|
|
deps:
|
|
|
|
ag require src \
|
|
|
|
| sed 's/\(.*\.fnl\).*require :\([^\.]*\)\.\([^)]*\)).*/"\1" -> "\2\/\3.fnl"/' \
|
|
|
|
| awk 'BEGIN { print "digraph {" } { print } END { print "}" }' \
|
|
|
|
| dot -Tpng \
|
|
|
|
> doc/deps.png
|
|
|
|
|
|
|
|
# create dependency graph but sixel
|
|
|
|
[group('docs')]
|
|
|
|
depsxl:
|
|
|
|
ag require src \
|
|
|
|
| sed 's/\(.*\.fnl\).*require :\([^\.]*\)\.\([^)]*\)).*/"\1" -> "\2\/\3.fnl"/' \
|
|
|
|
| awk 'BEGIN { print "digraph {" } { print } END { print "}" }' \
|
|
|
|
| dot -Tpng \
|
|
|
|
| magick - -geometry 800 sixel:-
|
2024-08-02 18:22:14 +00:00
|
|
|
|
|
|
|
# bump version
|
2024-08-05 04:03:38 +00:00
|
|
|
[group('docs')]
|
2024-08-02 18:22:14 +00:00
|
|
|
bump:
|
|
|
|
#!/usr/local/bin/bash
|
2024-08-05 04:03:38 +00:00
|
|
|
currname=$(recsel doc/v/meta.rec -P version)
|
|
|
|
currnum=$(recsel doc/v/versions.rec -e "Name = '$currname'" -P Number)
|
2024-08-02 18:22:14 +00:00
|
|
|
nextnum=$((currnum + 1))
|
2024-08-05 04:03:38 +00:00
|
|
|
nextname=$(recsel doc/v/versions.rec -e "Number = $nextnum" -P Name)
|
2024-08-02 18:22:14 +00:00
|
|
|
echo "Bumping version from $currname to $nextname:"
|
2024-08-05 04:03:38 +00:00
|
|
|
recset doc/v/meta.rec -f version -s $nextname
|
|
|
|
recset doc/v/meta.rec -f updated -S $(gdate +'%Y-%m-%d')
|
|
|
|
recsel doc/v/meta.rec
|
2024-08-02 18:22:14 +00:00
|
|
|
|
|
|
|
# show full metadata
|
2024-08-05 04:03:38 +00:00
|
|
|
[group('docs')]
|
2024-08-02 18:22:14 +00:00
|
|
|
meta:
|
2024-08-05 04:03:38 +00:00
|
|
|
awk 'FNR==1{print ""}{print}' doc/v/*.rec | recsel -t meta -j version
|
2024-08-03 23:09:10 +00:00
|
|
|
|