forked from jaegertracing/jaeger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
490 lines (410 loc) · 17.2 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
# Copyright (c) 2023 The Jaeger Authors.
# SPDX-License-Identifier: Apache-2.0
SHELL := /bin/bash
JAEGER_IMPORT_PATH = github.com/jaegertracing/jaeger
STORAGE_PKGS = ./plugin/storage/integration/...
JAEGER_V2_STORAGE_PKGS = ./cmd/jaeger/internal/integration
# These DOCKER_xxx vars are used when building Docker images.
DOCKER_NAMESPACE?=jaegertracing
DOCKER_TAG?=latest
# SRC_ROOT is the top of the source tree.
SRC_ROOT := $(shell git rev-parse --show-toplevel)
# TODO we can compartmentalize this Makefile better, by separting:
# - integration tests
# - all the binary building targets
ifeq ($(DEBUG_BINARY),)
DISABLE_OPTIMIZATIONS =
SUFFIX =
TARGET = release
else
DISABLE_OPTIMIZATIONS = -gcflags="all=-N -l"
SUFFIX = -debug
TARGET = debug
endif
# All .go files that are not auto-generated and should be auto-formatted and linted.
ALL_SRC = $(shell find . -name '*.go' \
-not -name '_*' \
-not -name '.*' \
-not -name 'mocks*' \
-not -name '*.pb.go' \
-not -path './vendor/*' \
-not -path './internal/tools/*' \
-not -path '*/mocks/*' \
-not -path '*/*-gen/*' \
-not -path '*/thrift-0.9.2/*' \
-type f | \
sort)
# ALL_PKGS is used with 'nocover' and 'goleak'
ALL_PKGS = $(shell echo $(dir $(ALL_SRC)) | tr ' ' '\n' | sort -u)
UNAME := $(shell uname -m)
ifeq ($(UNAME), s390x)
# go test does not support -race flag on s390x architecture
RACE=
else
RACE=-race
endif
# sed on Mac does not support the same syntax for in-place updates as sed on Linux
# When running on MacOS it's best to install gsed and run Makefile with SED=gsed
SED=sed
GO=go
GOOS ?= $(shell $(GO) env GOOS)
GOARCH ?= $(shell $(GO) env GOARCH)
GOBUILD=CGO_ENABLED=0 installsuffix=cgo $(GO) build -trimpath
GOTEST_QUIET=$(GO) test $(RACE)
GOTEST=$(GOTEST_QUIET) -v
COVEROUT=cover.out
GOFMT=gofmt
FMT_LOG=.fmt.log
IMPORT_LOG=.import.log
COLORIZE ?= | $(SED) 's/PASS/✅ PASS/g' | $(SED) 's/FAIL/❌ FAIL/g' | $(SED) 's/SKIP/🔕 SKIP/g'
GIT_SHA=$(shell git rev-parse HEAD)
GIT_SHALLOW_CLONE := $(shell git rev-parse --is-shallow-repository)
# Some of GitHub Actions workflows do a shallow checkout without tags. This avoids logging warnings from git.
GIT_CLOSEST_TAG=$(shell if [ "$(GIT_SHALLOW_CLONE)" = "false" ]; then git describe --abbrev=0 --tags; else echo 0.0.0; fi)
ifneq ($(GIT_CLOSEST_TAG),$(shell echo ${GIT_CLOSEST_TAG} | grep -E "$(semver_regex)"))
$(warning GIT_CLOSEST_TAG=$(GIT_CLOSEST_TAG) is not in the semver format $(semver_regex))
endif
GIT_CLOSEST_TAG_MAJOR := $(shell echo $(GIT_CLOSEST_TAG) | $(SED) -n 's/v\([0-9]*\)\.[0-9]*\.[0-9]/\1/p')
GIT_CLOSEST_TAG_MINOR := $(shell echo $(GIT_CLOSEST_TAG) | $(SED) -n 's/v[0-9]*\.\([0-9]*\)\.[0-9]/\1/p')
GIT_CLOSEST_TAG_PATCH := $(shell echo $(GIT_CLOSEST_TAG) | $(SED) -n 's/v[0-9]*\.[0-9]*\.\([0-9]\)/\1/p')
DATE=$(shell TZ=UTC0 git show --quiet --date='format-local:%Y-%m-%dT%H:%M:%SZ' --format="%cd")
BUILD_INFO_IMPORT_PATH=$(JAEGER_IMPORT_PATH)/pkg/version
BUILD_INFO=-ldflags "-X $(BUILD_INFO_IMPORT_PATH).commitSHA=$(GIT_SHA) -X $(BUILD_INFO_IMPORT_PATH).latestVersion=$(GIT_CLOSEST_TAG) -X $(BUILD_INFO_IMPORT_PATH).date=$(DATE)"
SYSOFILE=resource.syso
# import other Makefiles after the variables are defined
include Makefile.Tools.mk
include docker/Makefile
include Makefile.Protobuf.mk
include Makefile.Thrift.mk
include Makefile.Crossdock.mk
.DEFAULT_GOAL := test-and-lint
.PHONY: test-and-lint
test-and-lint: test fmt lint
.PHONY: echo-version
echo-version:
@echo "$(GIT_CLOSEST_TAG)"
.PHONY: echo-all-pkgs
echo-all-pkgs:
@echo $(ALL_PKGS) | tr ' ' '\n' | sort
.PHONY: echo-all-srcs
echo-all-srcs:
@echo $(ALL_SRC) | tr ' ' '\n' | sort
.PHONY: clean
clean:
rm -rf cover*.out .cover/ cover.html $(FMT_LOG) $(IMPORT_LOG) \
jaeger-ui/packages/jaeger-ui/build
find ./cmd/query/app/ui/actual -type f -name '*.gz' -delete
GOCACHE=$(GOCACHE) go clean -cache -testcache
find cmd -type f -executable | xargs -I{} sh -c '(git ls-files --error-unmatch {} 2>/dev/null || rm -v {})'
.PHONY: test
test:
bash -c "set -e; set -o pipefail; $(GOTEST) -tags=memory_storage_integration ./... $(COLORIZE)"
.PHONY: all-in-one-integration-test
all-in-one-integration-test:
TEST_MODE=integration $(GOTEST) ./cmd/all-in-one/
# A general integration tests for jaeger-v2 storage backends,
# these tests placed at `./cmd/jaeger/internal/integration/*_test.go`.
# The integration tests are filtered by STORAGE env,
# currently the available STORAGE variable is:
# - grpc
.PHONY: jaeger-v2-storage-integration-test
jaeger-v2-storage-integration-test:
(cd cmd/jaeger/ && go build .)
# Expire tests results for jaeger storage integration tests since the environment might change
# even though the code remains the same.
go clean -testcache
bash -c "set -e; set -o pipefail; $(GOTEST) -coverpkg=./... -coverprofile $(COVEROUT) $(JAEGER_V2_STORAGE_PKGS) $(COLORIZE)"
.PHONY: storage-integration-test
storage-integration-test:
# Expire tests results for storage integration tests since the environment might change
# even though the code remains the same.
go clean -testcache
bash -c "set -e; set -o pipefail; $(GOTEST) -coverpkg=./... -coverprofile $(COVEROUT) $(STORAGE_PKGS) $(COLORIZE)"
.PHONY: badger-storage-integration-test
badger-storage-integration-test:
STORAGE=badger $(MAKE) storage-integration-test
.PHONY: grpc-storage-integration-test
grpc-storage-integration-test:
STORAGE=grpc $(MAKE) storage-integration-test
# this test assumes STORAGE environment variable is set to elasticsearch|opensearch
.PHONY: index-cleaner-integration-test
index-cleaner-integration-test: docker-images-elastic
$(MAKE) storage-integration-test COVEROUT=cover-index-cleaner.out
# this test assumes STORAGE environment variable is set to elasticsearch|opensearch
.PHONY: index-rollover-integration-test
index-rollover-integration-test: docker-images-elastic
$(MAKE) storage-integration-test COVEROUT=cover-index-rollover.out
.PHONY: cover
cover: nocover
bash -c "set -e; set -o pipefail; STORAGE=memory $(GOTEST) -timeout 5m -coverprofile $(COVEROUT) ./... | tee test-results.json"
go tool cover -html=cover.out -o cover.html
.PHONY: nocover
nocover:
@echo Verifying that all packages have test files to count in coverage
@scripts/check-test-files.sh $(ALL_PKGS)
.PHONY: goleak
goleak:
@echo Verifying that all packages with tests have goleak in their TestMain
@scripts/check-goleak-files.sh $(ALL_PKGS)
.PHONY: fmt
fmt: $(GOFUMPT)
@echo Running import-order-cleanup on ALL_SRC ...
@./scripts/import-order-cleanup.py -o inplace -t $(ALL_SRC)
@echo Running gofmt on ALL_SRC ...
@$(GOFMT) -e -s -l -w $(ALL_SRC)
@echo Running gofumpt on ALL_SRC ...
@$(GOFUMPT) -e -l -w $(ALL_SRC)
@echo Running updateLicense.py on ALL_SRC ...
@./scripts/updateLicense.py $(ALL_SRC)
.PHONY: lint
lint: $(LINT) goleak
@./scripts/updateLicense.py $(ALL_SRC) > $(FMT_LOG)
@./scripts/import-order-cleanup.py -o stdout -t $(ALL_SRC) > $(IMPORT_LOG)
@[ ! -s "$(FMT_LOG)" -a ! -s "$(IMPORT_LOG)" ] || (echo "License check or import ordering failures, run 'make fmt'" | cat - $(FMT_LOG) $(IMPORT_LOG) && false)
./scripts/check-semconv-version.sh
./scripts/check-go-version.sh
$(LINT) -v run
.PHONY: build-examples
build-examples:
$(GOBUILD) -o ./examples/hotrod/hotrod-$(GOOS)-$(GOARCH) ./examples/hotrod/main.go
.PHONY: build-tracegen
build-tracegen:
$(GOBUILD) $(BUILD_INFO) -o ./cmd/tracegen/tracegen-$(GOOS)-$(GOARCH) ./cmd/tracegen/
.PHONY: build-anonymizer
build-anonymizer:
$(GOBUILD) $(BUILD_INFO) -o ./cmd/anonymizer/anonymizer-$(GOOS)-$(GOARCH) $(BUILD_INFO) ./cmd/anonymizer/
.PHONY: build-esmapping-generator
build-esmapping-generator:
$(GOBUILD) -o ./plugin/storage/es/esmapping-generator-$(GOOS)-$(GOARCH) $(BUILD_INFO) ./cmd/esmapping-generator/
.PHONY: build-esmapping-generator-linux
build-esmapping-generator-linux:
GOOS=linux GOARCH=amd64 $(GOBUILD) -o ./plugin/storage/es/esmapping-generator $(BUILD_INFO) ./cmd/esmapping-generator/
.PHONY: build-es-index-cleaner
build-es-index-cleaner:
$(GOBUILD) -o ./cmd/es-index-cleaner/es-index-cleaner-$(GOOS)-$(GOARCH) ./cmd/es-index-cleaner/
.PHONY: build-es-rollover
build-es-rollover:
$(GOBUILD) -o ./cmd/es-rollover/es-rollover-$(GOOS)-$(GOARCH) ./cmd/es-rollover/
.PHONY: docker-hotrod
docker-hotrod:
GOOS=linux $(MAKE) build-examples
docker build -t $(DOCKER_NAMESPACE)/example-hotrod:${DOCKER_TAG} ./examples/hotrod --build-arg TARGETARCH=$(GOARCH)
.PHONY: run-all-in-one
run-all-in-one: build-ui
go run -tags ui ./cmd/all-in-one --log-level debug
build-ui: cmd/query/app/ui/actual/index.html.gz
cmd/query/app/ui/actual/index.html.gz: jaeger-ui/packages/jaeger-ui/build/index.html
# do not delete dot-files
rm -rf cmd/query/app/ui/actual/*
cp -r jaeger-ui/packages/jaeger-ui/build/* cmd/query/app/ui/actual/
find cmd/query/app/ui/actual -type f | grep -v .gitignore | xargs gzip --no-name
# copy the timestamp for index.html.gz from the original file
touch -t $$(date -r jaeger-ui/packages/jaeger-ui/build/index.html '+%Y%m%d%H%M.%S') cmd/query/app/ui/actual/index.html.gz
ls -lF cmd/query/app/ui/actual/
jaeger-ui/packages/jaeger-ui/build/index.html:
$(MAKE) rebuild-ui
.PHONY: rebuild-ui
rebuild-ui:
bash ./scripts/rebuild-ui.sh
@echo "NOTE: This target only rebuilds the UI assets inside jaeger-ui/packages/jaeger-ui/build/."
@echo "NOTE: To make them usable from query-service run 'make build-ui'."
.PHONY: build-all-in-one-linux
build-all-in-one-linux:
GOOS=linux $(MAKE) build-all-in-one
# Requires variables: $(BIN_NAME) $(BIN_PATH) $(GO_TAGS) $(DISABLE_OPTIMIZATIONS) $(SUFFIX) $(GOOS) $(GOARCH) $(BUILD_INFO)
# Other targets can depend on this one but with a unique suffix to ensure it is always executed.
BIN_PATH = ./cmd/$(BIN_NAME)
.PHONY: _build-a-binary
_build-a-binary-%:
$(GOBUILD) $(DISABLE_OPTIMIZATIONS) $(GO_TAGS) -o $(BIN_PATH)/$(BIN_NAME)$(SUFFIX)-$(GOOS)-$(GOARCH) $(BUILD_INFO) $(BIN_PATH)
.PHONY: build-jaeger
build-jaeger: BIN_NAME = jaeger
build-jaeger: GO_TAGS = -tags ui
build-jaeger: build-ui _build-a-binary-jaeger$(SUFFIX)-$(GOOS)-$(GOARCH)
.PHONY: build-all-in-one
build-all-in-one: BIN_NAME = all-in-one
build-all-in-one: GO_TAGS = -tags ui
build-all-in-one: build-ui _build-a-binary-all-in-one$(SUFFIX)-$(GOOS)-$(GOARCH)
.PHONY: build-agent
build-agent: BIN_NAME = agent
build-agent: _build-a-binary-agent$(SUFFIX)-$(GOOS)-$(GOARCH)
.PHONY: build-query
build-query: BIN_NAME = query
build-query: GO_TAGS = -tags ui
build-query: build-ui _build-a-binary-query$(SUFFIX)-$(GOOS)-$(GOARCH)
.PHONY: build-collector
build-collector: BIN_NAME = collector
build-collector: _build-a-binary-collector$(SUFFIX)-$(GOOS)-$(GOARCH)
.PHONY: build-ingester
build-ingester: BIN_NAME = ingester
build-ingester: _build-a-binary-ingester$(SUFFIX)-$(GOOS)-$(GOARCH)
.PHONY: build-remote-storage
build-remote-storage: BIN_NAME = remote-storage
build-remote-storage: _build-a-binary-remote-storage$(SUFFIX)-$(GOOS)-$(GOARCH)
# Magic values:
# - LangID "0409" is "US-English".
# - CharsetID "04B0" translates to decimal 1200 for "Unicode".
# - FileOS "040004" defines the Windows kernel "Windows NT".
# - FileType "01" is "Application".
define VERSIONINFO
{
"FixedFileInfo": {
"FileVersion": {
"Major": $(GIT_CLOSEST_TAG_MAJOR),
"Minor": $(GIT_CLOSEST_TAG_MINOR),
"Patch": $(GIT_CLOSEST_TAG_PATCH),
"Build": 0
},
"ProductVersion": {
"Major": $(GIT_CLOSEST_TAG_MAJOR),
"Minor": $(GIT_CLOSEST_TAG_MINOR),
"Patch": $(GIT_CLOSEST_TAG_PATCH),
"Build": 0
},
"FileFlagsMask": "3f",
"FileFlags ": "00",
"FileOS": "040004",
"FileType": "01",
"FileSubType": "00"
},
"StringFileInfo": {
"FileDescription": "$(NAME)",
"FileVersion": "$(GIT_CLOSEST_TAG_MAJOR).$(GIT_CLOSEST_TAG_MINOR).$(GIT_CLOSEST_TAG_PATCH).0",
"LegalCopyright": "2015-2023 The Jaeger Project Authors",
"ProductName": "$(NAME)",
"ProductVersion": "$(GIT_CLOSEST_TAG_MAJOR).$(GIT_CLOSEST_TAG_MINOR).$(GIT_CLOSEST_TAG_PATCH).0"
},
"VarFileInfo": {
"Translation": {
"LangID": "0409",
"CharsetID": "04B0"
}
}
}
endef
export VERSIONINFO
.PHONY: _prepare-winres
_prepare-winres:
$(MAKE) _prepare-winres-helper NAME="Jaeger Agent" PKGPATH="cmd/agent"
$(MAKE) _prepare-winres-helper NAME="Jaeger Collector" PKGPATH="cmd/collector"
$(MAKE) _prepare-winres-helper NAME="Jaeger Query" PKGPATH="cmd/query"
$(MAKE) _prepare-winres-helper NAME="Jaeger Ingester" PKGPATH="cmd/ingester"
$(MAKE) _prepare-winres-helper NAME="Jaeger Remote Storage" PKGPATH="cmd/remote-storage"
$(MAKE) _prepare-winres-helper NAME="Jaeger All-In-One" PKGPATH="cmd/all-in-one"
$(MAKE) _prepare-winres-helper NAME="Jaeger V2" PKGPATH="cmd/jaeger"
$(MAKE) _prepare-winres-helper NAME="Jaeger Tracegen" PKGPATH="cmd/tracegen"
$(MAKE) _prepare-winres-helper NAME="Jaeger Anonymizer" PKGPATH="cmd/anonymizer"
$(MAKE) _prepare-winres-helper NAME="Jaeger ES-Index-Cleaner" PKGPATH="cmd/es-index-cleaner"
$(MAKE) _prepare-winres-helper NAME="Jaeger ES-Rollover" PKGPATH="cmd/es-rollover"
.PHONY: _prepare-winres-helper
_prepare-winres-helper:
echo $$VERSIONINFO | $(GOVERSIONINFO) -o="$(PKGPATH)/$(SYSOFILE)" -
.PHONY: build-binaries-linux
build-binaries-linux: build-binaries-amd64
.PHONY: build-binaries-amd64
build-binaries-amd64:
GOOS=linux GOARCH=amd64 $(MAKE) _build-platform-binaries
.PHONY: build-binaries-windows
build-binaries-windows: _prepare-winres
GOOS=windows GOARCH=amd64 $(MAKE) _build-platform-binaries
rm ./cmd/*/$(SYSOFILE)
.PHONY: build-binaries-darwin
build-binaries-darwin:
GOOS=darwin GOARCH=amd64 $(MAKE) _build-platform-binaries
.PHONY: build-binaries-darwin-arm64
build-binaries-darwin-arm64:
GOOS=darwin GOARCH=arm64 $(MAKE) _build-platform-binaries
.PHONY: build-binaries-s390x
build-binaries-s390x:
GOOS=linux GOARCH=s390x $(MAKE) _build-platform-binaries
.PHONY: build-binaries-arm64
build-binaries-arm64:
GOOS=linux GOARCH=arm64 $(MAKE) _build-platform-binaries
.PHONY: build-binaries-ppc64le
build-binaries-ppc64le:
GOOS=linux GOARCH=ppc64le $(MAKE) _build-platform-binaries
# build all binaries for one specific platform GOOS/GOARCH
.PHONY: _build-platform-binaries
_build-platform-binaries: build-agent \
build-all-in-one \
build-collector \
build-query \
build-ingester \
build-jaeger \
build-remote-storage \
build-examples \
build-tracegen \
build-anonymizer \
build-esmapping-generator \
build-es-index-cleaner \
build-es-rollover
$(MAKE) _build-platform-binaries-debug GOOS=$(GOOS) GOARCH=$(GOARCH) DEBUG_BINARY=1
# build binaries that support DEBUG release, for one specific platform GOOS/GOARCH
.PHONY: _build-platform-binaries-debug
_build-platform-binaries-debug: build-agent \
build-collector \
build-query \
build-ingester \
build-remote-storage \
build-all-in-one \
.PHONY: build-all-platforms
build-all-platforms: \
build-binaries-linux \
build-binaries-windows \
build-binaries-darwin \
build-binaries-darwin-arm64 \
build-binaries-s390x \
build-binaries-arm64 \
build-binaries-ppc64le
.PHONY: docker-images-cassandra
docker-images-cassandra:
docker build -t $(DOCKER_NAMESPACE)/jaeger-cassandra-schema:${DOCKER_TAG} plugin/storage/cassandra/
@echo "Finished building jaeger-cassandra-schema =============="
.PHONY: docker-images-elastic
docker-images-elastic: create-baseimg
GOOS=linux GOARCH=$(GOARCH) $(MAKE) build-esmapping-generator
GOOS=linux GOARCH=$(GOARCH) $(MAKE) build-es-index-cleaner
GOOS=linux GOARCH=$(GOARCH) $(MAKE) build-es-rollover
docker build -t $(DOCKER_NAMESPACE)/jaeger-es-index-cleaner:${DOCKER_TAG} --build-arg base_image=$(BASE_IMAGE) --build-arg TARGETARCH=$(GOARCH) cmd/es-index-cleaner
docker build -t $(DOCKER_NAMESPACE)/jaeger-es-rollover:${DOCKER_TAG} --build-arg base_image=$(BASE_IMAGE) --build-arg TARGETARCH=$(GOARCH) cmd/es-rollover
@echo "Finished building jaeger-es-indices-clean =============="
.PHONY: docker-images-tracegen
docker-images-tracegen:
docker build -t $(DOCKER_NAMESPACE)/jaeger-tracegen:${DOCKER_TAG} cmd/tracegen/ --build-arg TARGETARCH=$(GOARCH)
@echo "Finished building jaeger-tracegen =============="
.PHONY: docker-images-anonymizer
docker-images-anonymizer:
docker build -t $(DOCKER_NAMESPACE)/jaeger-anonymizer:${DOCKER_TAG} cmd/anonymizer/ --build-arg TARGETARCH=$(GOARCH)
@echo "Finished building jaeger-anonymizer =============="
.PHONY: changelog
changelog:
./scripts/release-notes.py --exclude-dependabot --verbose
.PHONY: draft-release
draft-release:
./scripts/draft-release.py
.PHONY: test-ci
test-ci: GOTEST := $(GOTEST_QUIET)
test-ci: build-examples cover
.PHONY: init-submodules
init-submodules:
git submodule update --init --recursive
MOCKERY_FLAGS := --all --disable-version-string
.PHONY: generate-mocks
generate-mocks: $(MOCKERY)
$(MOCKERY)
.PHONY: certs
certs:
cd pkg/config/tlscfg/testdata && ./gen-certs.sh
.PHONY: certs-dryrun
certs-dryrun:
cd pkg/config/tlscfg/testdata && ./gen-certs.sh -d
.PHONY: repro-check
repro-check:
# Check local reproducibility of generated executables.
$(MAKE) clean
$(MAKE) build-all-platforms
# Generate checksum for all executables under ./cmd
find cmd -type f -executable -exec shasum -b -a 256 {} \; | sort -k2 | tee sha256sum.combined.txt
$(MAKE) clean
$(MAKE) build-all-platforms
shasum -b -a 256 --strict --check ./sha256sum.combined.txt