-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (33 loc) · 974 Bytes
/
Copy pathMakefile
File metadata and controls
47 lines (33 loc) · 974 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
44
45
46
47
BINARY := lily
BINDIR := bin
GO := go
GOFLAGS := -trimpath -ldflags="-s -w"
VERSION ?= $(shell grep 'Version =' internal/version/version.go | sed "s/.*= \"//;s/\".*//")
LDFLAGS := -s -w -X internal/version.Version=$(VERSION)
.PHONY: build install install-go clean test test-e2e test-e2e-aws test-verbose fmt vet snapshot release all
all: test build
build:
@mkdir -p $(BINDIR)
$(GO) build -trimpath -ldflags="$(LDFLAGS)" -o $(BINDIR)/$(BINARY) ./cmd/lily
install: build
cp $(BINDIR)/$(BINARY) /usr/local/bin/
install-go:
$(GO) install ./cmd/lily
clean:
rm -rf $(BINDIR) dist
test:
$(GO) test ./... -count=1
test-verbose:
$(GO) test ./... -v -count=1
test-e2e:
LILY_E2E=1 $(GO) test ./test/e2e/ -v -count=1 -timeout 20m
test-e2e-aws:
LILY_E2E_AWS=1 $(GO) test ./test/e2e/ -run "^TestAWSMain$" -v -count=1 -timeout 10m
fmt:
$(GO)fmt -w .
vet:
$(GO) vet ./...
snapshot:
goreleaser release --snapshot --clean
release:
goreleaser release --clean