add package commands to justfile
and remove the old windows binary boilerplate I had forgotten about
This commit is contained in:
parent
be41eadb43
commit
a6a62f74d1
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
bin/
|
bin/
|
||||||
|
dist/
|
||||||
|
|
16
justfile
16
justfile
|
@ -1,7 +1,10 @@
|
||||||
binary := "gt"
|
binary := "gt"
|
||||||
|
version := "0.0.1"
|
||||||
build_dir := "bin"
|
build_dir := "bin"
|
||||||
|
dist_dir := "dist"
|
||||||
cmd := "."
|
cmd := "."
|
||||||
output := "." / build_dir / binary
|
output := "." / build_dir / binary
|
||||||
|
dist := "." / dist_dir / binary
|
||||||
|
|
||||||
# do the thing
|
# do the thing
|
||||||
default: test check install
|
default: test check install
|
||||||
|
@ -10,9 +13,12 @@ default: test check install
|
||||||
build:
|
build:
|
||||||
go build -o {{output}} {{cmd}}
|
go build -o {{output}} {{cmd}}
|
||||||
|
|
||||||
# build windows binary
|
package:
|
||||||
build-windows:
|
go build -o {{binary}}
|
||||||
GOOS=windows GOARCH=amd64 go build -o {{output}}.exe {{cmd}}
|
distrobox enter alpine -- go build -o {{binary}}-musl {{cmd}}
|
||||||
|
tar cafv {{dist_dir}}/{{binary}}-{{version}}-x86_64.tar.gz {{binary}} README.md LICENSE
|
||||||
|
tar cafv {{dist_dir}}/{{binary}}-{{version}}-x86_64-musl.tar.gz {{binary}}-musl README.md LICENSE
|
||||||
|
rm {{binary}} {{binary}}-musl
|
||||||
|
|
||||||
# run from source
|
# run from source
|
||||||
run:
|
run:
|
||||||
|
@ -37,7 +43,9 @@ install-man:
|
||||||
|
|
||||||
# clean up after yourself
|
# clean up after yourself
|
||||||
clean:
|
clean:
|
||||||
rm {{output}}
|
-rm {{output}}
|
||||||
|
-rm {{output}}-musl
|
||||||
|
-rm {{dist_dir}}/*
|
||||||
|
|
||||||
# run go tests
|
# run go tests
|
||||||
test:
|
test:
|
||||||
|
|
Loading…
Reference in a new issue