generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (33 loc) · 790 Bytes
/
Makefile
File metadata and controls
43 lines (33 loc) · 790 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
34
35
36
37
38
39
40
41
42
43
default: build
SETENV=
ifeq ($(OS),Windows_NT)
SETENV=set
endif
ifeq ($(OS),Windows_NT)
BINARY_NAME=btptf.exe
GOBIN_PATH=$(if $(GOBIN),$(GOBIN),$(shell powershell -Command go env GOPATH)\bin)
BINARY_PATH=$(GOBIN_PATH)\$(BINARY_NAME)
else
BINARY_NAME=btptf
GOBIN_PATH=$(if $(GOBIN),$(GOBIN),$(shell go env GOPATH)/bin)
BINARY_PATH=$(GOBIN_PATH)/$(BINARY_NAME)
endif
MAIN_PACKAGE=main.go
build:
go build -v ./...
fix:
go fix -v ./...
install: build
go build -o $(BINARY_PATH) $(MAIN_PACKAGE)
lint:
golangci-lint run
fmt:
gofmt -s -w -e .
test:
go test -v -cover -tags=all -timeout=900s -parallel=4 ./...
docs:
go run main.go gendoc
spellchecker:
#prerequisite: Install pyspelling and aspell
pyspelling -c .spellcheck.yml
.PHONY: build fix install lint fmt test docs