-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
44 lines (32 loc) · 877 Bytes
/
Makefile
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
33
34
35
36
37
38
39
40
41
42
include ../Golang.mk
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.ONESHELL:
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
LATEST_TAG = $(shell git describe --tags)
CONTAINER_NAME=quay.io/reconmap/agent:latest
PROGRAM=reconmapd
$(PROGRAM):
go build -v -ldflags="-X 'github.com/reconmap/agent/internal/build.BuildVersion=$(LATEST_TAG)'" -o $(PROGRAM) ./cmd/reconmapd
.PHONY: tests
tests:
go test ./...
.PHONY: clean
clean:
rm -f $(PROGRAM)
.PHONY: docker-build
docker-build:
docker build -t $(CONTAINER_NAME) .
.PHONY: docker-push
docker-push:
docker push $(CONTAINER_NAME)
.PHONY: lint
lint: GOLANGCI_LINT_VERSION ?= 1.60.1
lint:
docker run \
-v $(CURDIR):/reconmap/agent \
-w /reconmap/agent \
golangci/golangci-lint:v$(GOLANGCI_LINT_VERSION)-alpine \
golangci-lint run -c .golangci.yml --timeout 10m --fix