Lilian Jónsdóttir
965034923b
just is more widely used thus has better tab completion, etc. also it's easier to write a justfile than a magefile
27 lines
361 B
Makefile
27 lines
361 B
Makefile
binary := "fml"
|
|
build_dir := "bin"
|
|
cmd := "./cmd/" + binary
|
|
output := "." / build_dir / binary
|
|
|
|
default: run
|
|
|
|
# build binary
|
|
build:
|
|
go build -o {{output}} {{cmd}}
|
|
|
|
# run from source
|
|
run:
|
|
go run {{cmd}}
|
|
|
|
# build 'n run
|
|
run-binary: build
|
|
exec {{output}}
|
|
|
|
# run with args
|
|
run-args args:
|
|
go run {{cmd}} {{args}}
|
|
|
|
# clean up after yourself
|
|
clean:
|
|
rm {{output}}
|