-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (31 loc) · 741 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (31 loc) · 741 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
VERSION = $(shell godzil show-version)
CURRENT_REVISION = $(shell git rev-parse --short HEAD)
BUILD_LDFLAGS = "-s -w -X main.commit=$(CURRENT_REVISION)"
u := $(if $(update),-u)
.PHONY: deps
deps:
go get ${u} -d
go mod tidy
.PHONY: devel-deps
devel-deps:
GO111MODULE=off go get ${u} \
golang.org/x/lint/golint \
github.com/Songmu/godzil/cmd/godzil \
github.com/Songmu/gocredits/cmd/gocredits
.PHONY: test
test:
go test ./...
.PHONY: lint
lint: devel-deps
golint -set_exit_status
.PHONY: build
build:
go build -ldflags=$(BUILD_LDFLAGS)
.PHONY: install
install:
go install -ldflags=$(BUILD_LDFLAGS)
.PHONY: release
release: devel-deps
godzil release
CREDITS: deps devel-deps go.sum
gocredits -w