26 lines
574 B
Makefile
26 lines
574 B
Makefile
[private]
|
|
default:
|
|
@just help
|
|
|
|
help:
|
|
just --list
|
|
|
|
build:
|
|
go build -ldflags='-s -w' .
|
|
|
|
watch:
|
|
#!/usr/bin/env bash
|
|
while :; do
|
|
inotifywait -q -e create,modify,delete --exclude '.git' --recursive {{ justfile_directory() }} \
|
|
| while read -r directory events filename; do
|
|
if [[ $events =~ "ISDIR" ]]; then
|
|
break
|
|
elif [[ $filename =~ \.go$ ]]; then
|
|
printf "[%s]: %s%s\n" "$events" "$directory" "$filename"
|
|
just build
|
|
fi
|
|
done
|
|
done
|
|
|
|
clean:
|
|
git clean -fxd
|