-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
29 lines (24 loc) · 754 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
# Variable Config
PWD := $(shell pwd)
GOPATH := $(shell go env GOPATH)
all: build
.PHONY: test
# Building
build:
@echo "Building Rudder to $(PWD)/rudder..."
@GO111MODULE=on go build -o $(PWD)/rudder ./cmd/rudder
# Linting and testing
$(GOPATH)/bin/golangci-lint:
@curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.17.1
lint: $(GOPATH)/bin/golangci-lint
@echo "Running golangci-lint"
@golangci-lint run ./internal/... ./cmd/...
test:
@GO111MODULE=on go test -race -covermode=atomic -coverprofile=c.out ./internal/...
# Remove generated files
clean:
@echo "Cleaning up all generated files"
@rm -rf $(PWD)/rudder
@rm -rf $(PWD)/c.out
@rm -rf $(PWD)/kube
@rm -rf $(PWD)/dist