forked from temporalio/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (33 loc) · 1.17 KB
/
Makefile
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
############################# Main targets #############################
# Install all tools, recompile proto files, run all possible checks and tests (long but comprehensive).
all: clean build
########################################################################
##### Variables ######
COLOR := "\e[1;36m%s\e[0m\n"
ifndef GOOS
GOOS := $(shell go env GOOS)
endif
ifndef GOARCH
GOARCH := $(shell go env GOARCH)
endif
# go.opentelemetry.io/otel/sdk/metric@v0.31.0 - there are breaking changes in v0.32.0.
# github.com/urfave/cli/v2@v2.4.0 - needs to accept comma in values before unlocking https://github.com/urfave/cli/pull/1241.
PINNED_DEPENDENCIES := \
go.opentelemetry.io/otel/sdk/metric@v0.31.0 \
github.com/urfave/cli/v2@v2.4.0
##### Build #####
build:
@printf $(COLOR) "Building Temporal CLI with OS: $(GOOS), ARCH: $(GOARCH)..."
CGO_ENABLED=0 go build ./cmd/temporal
clean:
@printf $(COLOR) "Clearing binaries..."
@rm -f temporal
##### Test #####
test:
@printf $(COLOR) "Running unit tests..."
go test ./... -race
##### Misc #####
update-dependencies:
@printf $(COLOR) "Update dependencies..."
@go get -u -t $(PINNED_DEPENDENCIES) ./...
@go mod tidy