yr/justfile

38 lines
600 B
Makefile
Raw Normal View History

builddir := "./build"
default:
just --list
dev +args='--help':
go run main.go {{args}}
test:
go test ./...
tidy:
go mod tidy
vet:
go vet ./...
clean:
rm -f build/*
rm -rf yr-*
rm -f yr-*.tar.gz
build:
go build -o {{builddir}}/
build-release tag version os arch:
GOOS="{{os}}" GOARCH="{{arch}}" just build
mkdir -p yr-{{version}}
cp {{builddir}}/yr yr-{{version}}/
if [ {{os}} = windows ]; then \
mv yr-{{version}}/yr{,.exe}; \
fi
tar czf yr-{{version}}-{{os}}-{{arch}}.tar.gz yr-{{version}}
hut git artifact upload --rev {{tag}} yr-{{version}}-{{os}}-{{arch}}.tar.gz