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
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: binaries
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
|
|
|
./hack/build
|
|
|
|
|
|
|
|
.PHONY: shell
|
2019-03-23 07:23:09 +08:00
|
|
|
shell:
|
|
|
|
./hack/shell
|
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: binaries
|
2019-03-23 08:21:05 +08:00
|
|
|
binaries:
|
2021-09-04 04:49:59 +08:00
|
|
|
$(BUILDX_CMD) bake binaries
|
2019-03-23 08:21:05 +08:00
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: binaries-cross
|
2019-03-23 09:02:57 +08:00
|
|
|
binaries-cross:
|
2021-09-04 04:49:59 +08:00
|
|
|
$(BUILDX_CMD) bake binaries-cross
|
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
|
2021-09-04 04:49:59 +08:00
|
|
|
validate-all: lint test validate-vendor validate-docs
|
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: lint
|
2019-03-23 07:23:09 +08:00
|
|
|
lint:
|
2021-09-04 04:49:59 +08:00
|
|
|
$(BUILDX_CMD) bake lint
|
2019-03-23 08:27:44 +08:00
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: test
|
2019-03-23 09:52:36 +08:00
|
|
|
test:
|
2021-09-04 04:49:59 +08:00
|
|
|
$(BUILDX_CMD) bake test
|
2019-03-23 09:52:36 +08:00
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: validate-vendor
|
2019-03-23 09:18:07 +08:00
|
|
|
validate-vendor:
|
2021-09-04 04:49:59 +08:00
|
|
|
$(BUILDX_CMD) bake validate-vendor
|
2021-08-19 11:05:15 +08:00
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: validate-docs
|
2021-03-24 01:40:56 +08:00
|
|
|
validate-docs:
|
2021-09-04 04:49:59 +08:00
|
|
|
$(BUILDX_CMD) bake validate-docs
|
2021-08-19 11:05:15 +08:00
|
|
|
|
2022-11-29 19:54:15 +08:00
|
|
|
.PHONY: validate-authors
|
2021-09-04 04:49:59 +08:00
|
|
|
validate-authors:
|
|
|
|
$(BUILDX_CMD) bake validate-authors
|
2019-03-23 09:18:07 +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
|