go-wifi-switcher/Makefile

29 lines
854 B
Makefile
Raw Permalink Normal View History

2023-03-01 22:23:04 +01:00
BINARY_DIR=bin
BINARY_NAME=wifi-switcher
COVERAGE_DIR=coverage
lint:
golangci-lint run ./...
goreportcard:
goreportcard-cli -v
test:
go test ./...
test-coverage:
rm -rf ${COVERAGE_DIR}
mkdir ${COVERAGE_DIR}
go test -v -coverprofile ${COVERAGE_DIR}/cover.out ./...
go tool cover -html ${COVERAGE_DIR}/cover.out -o ${COVERAGE_DIR}/cover.html
build:
rm -rf ${BINARY_DIR}
mkdir ${BINARY_DIR}
2023-03-02 18:39:30 +01:00
env GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o ./${BINARY_DIR}/${BINARY_NAME} main.go
2023-03-07 23:07:29 +01:00
build_raspi:
rm -rf ${BINARY_DIR}
mkdir ${BINARY_DIR}
env GOOS=linux CGO_ENABLED=0 GOARCH=arm64 go build -o ./${BINARY_DIR}/${BINARY_NAME} main.go
2023-03-04 21:56:47 +01:00
build_freebsd:
2023-03-02 18:39:30 +01:00
rm -rf ${BINARY_DIR}
mkdir ${BINARY_DIR}
env GOOS=freebsd CGO_ENABLED=0 GOARCH=arm64 ENV=prod go build -o ./${BINARY_DIR}/${BINARY_NAME} main.go
list_build_types:
go tool dist list | grep arm