-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (22 loc) · 683 Bytes
/
Makefile
File metadata and controls
27 lines (22 loc) · 683 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
APP_NAME=content-prep
GOLANGCI_LINT_VERSION=1.61.0
LOCALBIN=$(shell pwd)/bin
.PHONY: dep
dep:
@echo "Installing dependencies..."
go mod tidy
.PHONY: build
build: dep
@echo "Building..."
go build -o dist/$(APP_NAME) main.go
.PHONY: test
test: dep
@echo "Running tests..."
go test -v ./...
.PHONY: lint
lint: $(LOCALBIN)/golangci-lint dep
@echo "Running golangci-lint version ${GOLANGCI_LINT_VERSION}..."
@$(LOCALBIN)/golangci-lint run
$(LOCALBIN)/golangci-lint:
@echo "Installing golangci-lint version ${GOLANGCI_LINT_VERSION}..."
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(LOCALBIN) v${GOLANGCI_LINT_VERSION}