2021-09-04 04:49:59 +08:00
|
|
|
ifneq (, $(BUILDX_BIN))
|
|
|
|
export BUILDX_CMD = $(BUILDX_BIN)
|
|
|
|
else ifneq (, $(shell docker buildx version))
|
|
|
|
export BUILDX_CMD = docker buildx
|
|
|
|
else ifneq (, $(shell which buildx))
|
|
|
|
export BUILDX_CMD = $(which buildx)
|
|
|
|
endif
|
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
export BUILDX_CMD ?= docker buildx
|
|
|
|
|
2024-04-25 09:18:46 +08:00
|
|
|
BAKE_TARGETS := binaries binaries-cross lint lint-gopls validate-vendor validate-docs validate-authors validate-generated-files
|
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: all
|
|
|
|
all: binaries
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
|
|
|
./hack/build
|
|
|
|
|
|
|
|
.PHONY: shell
|
2019-03-23 07:23:09 +08:00
|
|
|
shell:
|
|
|
|
./hack/shell
|
|
|
|
|
2024-04-25 09:18:46 +08:00
|
|
|
.PHONY: $(BAKE_TARGETS)
|
|
|
|
$(BAKE_TARGETS):
|
|
|
|
$(BUILDX_CMD) bake $@
|
2020-12-08 00:29:35 +08:00
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: install
|
2019-03-23 08:27:44 +08:00
|
|
|
install: binaries
|
|
|
|
mkdir -p ~/.docker/cli-plugins
|
2022-10-24 05:03:55 +08:00
|
|
|
install bin/build/buildx ~/.docker/cli-plugins/docker-buildx
|
2019-03-23 08:27:44 +08:00
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: release
|
2021-09-04 04:49:59 +08:00
|
|
|
release:
|
|
|
|
./hack/release
|
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: validate-all
|
2022-08-29 13:14:14 +08:00
|
|
|
validate-all: lint test validate-vendor validate-docs validate-generated-files
|
2021-09-04 04:49:59 +08:00
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: test
|
2019-03-23 09:52:36 +08:00
|
|
|
test:
|
2023-05-30 06:57:16 +08:00
|
|
|
./hack/test
|
|
|
|
|
|
|
|
.PHONY: test-unit
|
|
|
|
test-unit:
|
|
|
|
TESTPKGS=./... SKIP_INTEGRATION_TESTS=1 ./hack/test
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test-integration:
|
|
|
|
TESTPKGS=./tests ./hack/test
|
2019-03-23 09:52:36 +08:00
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: test-driver
|
2021-09-23 16:49:24 +08:00
|
|
|
test-driver:
|
|
|
|
./hack/test-driver
|
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: vendor
|
2019-03-23 07:23:09 +08:00
|
|
|
vendor:
|
|
|
|
./hack/update-vendor
|
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: docs
|
2021-03-24 01:40:56 +08:00
|
|
|
docs:
|
|
|
|
./hack/update-docs
|
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: authors
|
2021-09-04 04:49:59 +08:00
|
|
|
authors:
|
|
|
|
$(BUILDX_CMD) bake update-authors
|
2019-05-22 21:43:25 +08:00
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: mod-outdated
|
2021-09-05 00:57:10 +08:00
|
|
|
mod-outdated:
|
|
|
|
$(BUILDX_CMD) bake mod-outdated
|
2022-08-29 13:14:14 +08:00
|
|
|
|
|
|
|
.PHONY: generated-files
|
|
|
|
generated-files:
|
|
|
|
$(BUILDX_CMD) bake update-generated-files
|