-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
61 lines (53 loc) · 1.55 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Function to execute a command.
# Accepts command to execute as first parameter.
define exec-command
$(1)
endef
.PHONY: default
default:
cd stefgen && make
cd go/pkg && make
cd go/grpc && make
cd go/otel && make
cd go/pdata && make
cd otelcol && make
cd benchmarks && make
.PHONY: all
all:
cd stefgen && make all
cd go/pkg && make all
cd go/grpc && make all
cd go/otel && make all
cd go/pdata && make all
cd otelcol && make all
cd benchmarks && make all
.PHONY: build-ci
build-ci:
cd stefgen && make all
cd go/pkg && make all
cd go/grpc && make
cd go/otel && make all
cd go/pdata && make all
cd otelcol && make all
cd benchmarks && make all
.PHONY: verifyver
verifyver:
ifndef VERSION
@echo "VERSION is unset or set to the empty string"
@exit 1
endif
.PHONY: prepver
prepver: verifyver
echo Updating to version ${VERSION}
cd go/grpc && go mod edit -require=github.com/splunk/stef/go/pkg@${VERSION} && go mod tidy
cd go/otel && go mod edit -require=github.com/splunk/stef/go/pkg@${VERSION} \
&& go mod edit -require=github.com/splunk/stef/go/grpc@${VERSION} && go mod tidy
cd go/pdata && go mod edit -require=github.com/splunk/stef/go/pkg@${VERSION} \
&& go mod edit -require=github.com/splunk/stef/go/otel@${VERSION} && go mod tidy
cd otelcol && go mod tidy
cd benchmarks && go mod tidy
MODULES := go/pkg go/grpc go/otel go/pdata
.PHONY: releasever
releasever: verifyver
echo Tagging version $(VERSION)
$(foreach gomod,$(MODULES),$(call exec-command,git tag $(gomod)/$(VERSION) && git push origin $(gomod)/$(VERSION)))