mirror of
https://github.com/aptible/supercronic.git
synced 2025-12-24 12:12:27 +08:00
40 lines
692 B
Makefile
40 lines
692 B
Makefile
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
|
SHELL=/bin/bash
|
|
VERSION=$(shell git describe --tags --always --dirty)
|
|
|
|
.PHONY: deps
|
|
deps:
|
|
go mod vendor
|
|
|
|
.PHONY: build
|
|
build: $(GOFILES)
|
|
go build -ldflags "-X main.Version=${VERSION}"
|
|
|
|
.PHONY: unit
|
|
unit:
|
|
go test -v -race $$(go list ./... | grep -v /vendor/)
|
|
go vet $$(go list ./... | grep -v /vendor/)
|
|
|
|
.PHONY: integration
|
|
integration: VERSION=v1337
|
|
integration: build
|
|
bats integration
|
|
|
|
.PHONY: test
|
|
test: unit integration
|
|
true
|
|
|
|
.PHONY: vulncheck
|
|
vulncheck: build
|
|
govulncheck ./...
|
|
|
|
.PHONY: fmt
|
|
fmt:
|
|
gofmt -l -w ${GOFILES_NOVENDOR}
|
|
|
|
.PHONY: release
|
|
release:
|
|
./build.sh ${VERSION}
|
|
|
|
.DEFAULT_GOAL := test
|