git-webhook-ci/Makefile

19 lines
496 B
Makefile
Raw Normal View History

2023-02-26 11:07:30 +01:00
BINARY_DIR=bin
BINARY_NAME=webhook-listener
2023-02-26 10:59:41 +01:00
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
2023-02-26 11:07:30 +01:00
build:
2023-02-26 22:09:51 +01:00
rm -rf ${BINARY_DIR}
2023-02-26 11:07:30 +01:00
mkdir ${BINARY_DIR}
2023-02-26 22:09:51 +01:00
env GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o ./${BINARY_DIR}/${BINARY_NAME} main.go