-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (26 loc) · 879 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (26 loc) · 879 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
GIT_COMMIT=$(shell git rev-parse --verify HEAD)
UTC_NOW=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
.PHONY: build-dev
build-dev:
CGO_ENABLED=0 go build \
-ldflags="-X 'main.version=dev' -X 'main.commit=${GIT_COMMIT}' -X 'main.date=${UTC_NOW}'" \
-o labctl
.PHONY: build-dev-darwin-arm64
build-dev-darwin-arm64:
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build \
-ldflags="-X 'main.version=dev' -X 'main.commit=${GIT_COMMIT}' -X 'main.date=${UTC_NOW}'" \
-o labctl
.PHONY: build-dev-windows-amd64
build-dev-windows-amd64:
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build \
-ldflags="-X 'main.version=dev' -X 'main.commit=${GIT_COMMIT}' -X 'main.date=${UTC_NOW}'" \
-o labctl.exe
.PHONY: release
release:
goreleaser --clean
.PHONY: release-snapshot
release-snapshot:
goreleaser release --snapshot --clean
.PHONY: test-e2e
test-e2e:
go test -v -count 1 ./e2e/exec