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)
|
|
|
|
else
|
|
|
|
$(error "Buildx is required: https://github.com/docker/buildx#installing")
|
|
|
|
endif
|
|
|
|
|
|
|
|
export BIN_OUT = ./bin
|
|
|
|
export RELEASE_OUT = ./release-out
|
|
|
|
|
2019-03-23 07:23:09 +08:00
|
|
|
shell:
|
|
|
|
./hack/shell
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
2019-03-23 08:27:44 +08:00
|
|
|
install: binaries
|
|
|
|
mkdir -p ~/.docker/cli-plugins
|
2021-02-05 05:28:48 +08:00
|
|
|
install bin/buildx ~/.docker/cli-plugins/docker-buildx
|
2019-03-23 08:27:44 +08:00
|
|
|
|
2021-09-04 04:49:59 +08:00
|
|
|
release:
|
|
|
|
./hack/release
|
|
|
|
|
|
|
|
validate-all: lint test validate-vendor validate-docs
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
2021-09-04 04:49:59 +08:00
|
|
|
validate-authors:
|
|
|
|
$(BUILDX_CMD) bake validate-authors
|
2019-03-23 09:18:07 +08:00
|
|
|
|
2019-03-23 07:23:09 +08:00
|
|
|
vendor:
|
|
|
|
./hack/update-vendor
|
|
|
|
|
2021-03-24 01:40:56 +08:00
|
|
|
docs:
|
|
|
|
./hack/update-docs
|
|
|
|
|
2021-09-04 04:49:59 +08:00
|
|
|
authors:
|
|
|
|
$(BUILDX_CMD) bake update-authors
|
2019-05-22 21:43:25 +08:00
|
|
|
|
2021-09-04 04:49:59 +08:00
|
|
|
.PHONY: shell binaries binaries-cross install release validate-all lint validate-vendor validate-docs validate-authors vendor docs authors
|