-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (24 loc) · 595 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (24 loc) · 595 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
33
# SPDX-FileCopyrightText: Andrei Gherzan <andrei@gherzan.com>
#
# SPDX-License-Identifier: MIT
REUSE := $(shell command -v reuse 2> /dev/null)
GOLANGCI := $(shell command -v golangci-lint 2> /dev/null)
all: test testcover lint reuse build
test:
go test -race -coverprofile=coverage.out ./...
testcover: test
go tool cover -func=coverage.out
lint:
ifndef GOLANGCI
$(error "golangci is required to run lint checks on this projects")
endif
golangci-lint run
reuse:
ifdef REUSE
reuse lint
endif
build:
go build -o bin/ ./cmd/git-mirror-me
.SILENT: clean
clean:
rm -rf bin *.out dist