initial commit, it does the thing
This commit is contained in:
commit
cc1523034b
9 changed files with 1986 additions and 0 deletions
43
justfile
Normal file
43
justfile
Normal file
|
@ -0,0 +1,43 @@
|
|||
binary := "gt"
|
||||
build_dir := "bin"
|
||||
cmd := "."
|
||||
output := "." / build_dir / binary
|
||||
|
||||
# do the thing
|
||||
default: test check install
|
||||
|
||||
# build binary
|
||||
build:
|
||||
go build -o {{output}} {{cmd}}
|
||||
|
||||
# build windows binary
|
||||
build-windows:
|
||||
GOOS=windows GOARCH=amd64 go build -o {{output}}.exe {{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}}
|
||||
|
||||
# install binary into $GOPATH
|
||||
install:
|
||||
go install {{cmd}}
|
||||
|
||||
# clean up after yourself
|
||||
clean:
|
||||
rm {{output}}
|
||||
|
||||
# run go tests
|
||||
test:
|
||||
gotestsum
|
||||
|
||||
# run linter
|
||||
check:
|
||||
staticcheck ./...
|
Loading…
Add table
Add a link
Reference in a new issue