-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (22 loc) · 760 Bytes
/
Makefile
File metadata and controls
32 lines (22 loc) · 760 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
PKG = github.com/k1LoW/git-wt
COMMIT = $(shell git rev-parse --short HEAD)
BUILD_LDFLAGS = "-s -w -X $(PKG)/version.Revision=$(COMMIT)"
default: test
ci: depsdev test
test:
go test ./... -coverprofile=coverage.out -covermode=count -count=1
build:
go build -ldflags=$(BUILD_LDFLAGS) -trimpath
install:
go install -ldflags=$(BUILD_LDFLAGS) -trimpath
lint:
golangci-lint run ./...
go vet -vettool=`which gostyle` -gostyle.config=$(PWD)/.gostyle.yml ./...
depsdev:
go install github.com/Songmu/gocredits/cmd/gocredits@latest
go install github.com/k1LoW/gostyle@latest
prerelease_for_tagpr: depsdev
go mod download
gocredits -w .
git add CHANGELOG.md CREDITS go.mod go.sum
.PHONY: default ci test build install lint depsdev prerelease_for_tagpr