forked from awslabs/eksdemo
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (17 loc) · 543 Bytes
/
Copy pathMakefile
File metadata and controls
25 lines (17 loc) · 543 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
COMMIT = $(shell git rev-parse --short HEAD)
DATE = $(shell date -u "+%FT%TZ")
VERSION = $(shell git describe --tags --always --dirty="-dev")
VERSION_PKG := github.com/awslabs/eksdemo/pkg/version
LDFLAGS += -s -w
LDFLAGS += -X $(VERSION_PKG).date=$(DATE)
LDFLAGS += -X $(VERSION_PKG).commit=$(COMMIT)
LDFLAGS += -X $(VERSION_PKG).version=$(VERSION)
build:
CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)"
install:
CGO_ENABLED=0 go install -ldflags "$(LDFLAGS)"
lint:
golangci-lint run
tidy:
go mod tidy
.PHONY: build install lint tidy