VERSION="1.0.0" default: debug test run debug: go vet ./... gofmt -d ./ go build -mod vendor -o ./fave test: go test ./... run: @./fave -host 0.0.0.0 -port 8080 -dir ./hosts -debug true build: clean @-mkdir ./bin @cd ./bin @cd .. CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -a -o ./bin/fave.linux-amd64 -ldflags='-X main.Version=$(VERSION) -extldflags "-static"' CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -mod vendor -a -o ./bin/fave.darwin-amd64 -ldflags='-X main.Version=$(VERSION) -extldflags "-static"' CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -mod vendor -a -o ./bin/fave.windows-amd64.exe -ldflags='-X main.Version=$(VERSION) -extldflags "-static"' cd ./bin && find . -name 'fave*' | xargs -I{} tar czf {}.tar.gz {} cd ./bin && shasum -a 256 * > sha256sum.txt cat ./bin/sha256sum.txt clean: @-rm -r ./bin format: gofmt -w ./ update: go mod vendor go mod download