-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (27 loc) · 792 Bytes
/
Makefile
File metadata and controls
32 lines (27 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
GOLANGCI_VERSION := 0.0.38
IMAGE_TAG := $(if $(IMAGE_TAG),$(IMAGE_TAG),$(shell git rev-parse --short HEAD))
.PHONY: docker
docker:
docker build -t ${IMAGE_TAG} -f Dockerfile .
.PHONY: dep
dep:
go mod download
go mod tidy
.PHONY: build
build: dep
go build -o ./mittwald-container-action cmd/action/main.go
.PHONY: lint
lint: dep
docker run --rm -t \
-v $$(go env GOPATH):/go \
-v ${CURDIR}:/app \
-v $(HOME)/.cache:/home/mittwald-golangci/.cache \
-w /app \
-e LINT_ID=$$(id -u $$WHOAMI) \
-e GOFLAGS="-buildvcs=false" \
-e GOLANGCI_ADDITIONAL_YML="/app/build/ci/.golangci.yml" \
quay.io/mittwald/golangci-lint:$(GOLANGCI_VERSION) \
golangci-lint run -v --fix ./...
.PHONY: test
test:
go test -v -failfast -count=1 ./cmd/...