代码拉取完成,页面将自动刷新
.PHONY: all
all: format test build
# ==============================================================================
# Build options
ROOT_PACKAGE=github.com/superedge/superedge
VERSION_PACKAGE=github.com/superedge/superedge/pkg/version
# ==============================================================================
# Includes
include build/lib/common.mk
include build/lib/golang.mk
include build/lib/image.mk
# ==============================================================================
# Usage
define USAGE_OPTIONS
Options:
DEBUG Whether to generate debug symbols. Default is 0.
BINS The binaries to build. Default is all of cmd.
This option is available when using: make build/build.multiarch
Example: make build BINS="lite-apiserver edgeadm"
Example: make build.multiarch BINS="lite-apiserver edgeadm" PLATFORMS="linux_amd64 linux_arm64 linux_arm" VERSION="v2.0.0"
IMAGES Backend images to make. Default is all of cmd.
This option is available when using: make image/image.multiarch/push/push.multiarch
Example: make image IMAGES="application-grid-controller application-grid-wrapper"
PLATFORMS The multiple platforms to build. Default is linux_amd64、linux_arm64 and linux_arm
This option is available when using: make image.multiarch/manifest.multiarch
Example: make image.multiarch IMAGES="application-grid-controller application-grid-wrapper" PLATFORMS="linux_amd64 linux_arm64" VERSION="v2.0.0"
Example: make manifest.multiarch IMAGES="application-grid-wrapper application-grid-controller" PLATFORMS="linux_amd64 linux_arm64" REGISTRY_PREFIX="superedge" VERSION="v2.0.0"
VERSION The version information compiled into binaries.
The default is obtained from git.
V Set to 1 enable verbose build. Default is 0.
endef
export USAGE_OPTIONS
# ==============================================================================
# Targets
.PHONY: format
format:
go fmt ./pkg/... ./cmd/...
## build: Build source code for host platform.
.PHONY: build
build:
@$(MAKE) go.build
## build.multiarch: Build source code for multiple platforms. See option PLATFORMS.
.PHONY: build.multiarch
build.multiarch:
@$(MAKE) go.build.multiarch
## image: Build docker images for host arch.
.PHONY: image
image:
@$(MAKE) image.build
## image.multiarch: Build docker images for multiple platforms. See option PLATFORMS.
.PHONY: image.multiarch
image.multiarch:
@$(MAKE) image.build.multiarch
## push: Build docker images for host arch and push images to registry.
.PHONY: push
push:
@$(MAKE) image.push
## push.multiarch: Build docker images for multiple platforms and push images to registry.
.PHONY: push.multiarch
push.multiarch:
@$(MAKE) image.push.multiarch
## manifest: Build docker images for host arch and push manifest list to registry.
.PHONY: manifest
manifest:
@$(MAKE) image.manifest.push
## manifest.multiarch: Build docker images for multiple platforms and push manifest lists to registry.
.PHONY: manifest.multiarch
manifest.multiarch:
@$(MAKE) image.manifest.push.multiarch
## clean: Remove all files that are created by building.
.PHONY: clean
clean:
@$(MAKE) go.clean
## lint: Check syntax and styling of go sources.
.PHONY: lint
lint:
@$(MAKE) go.lint
## test: Run unit test.
.PHONY: test
test:
@$(MAKE) go.test
.PHONY: codegen
codegen:
hack/update-codegen.sh
.PHONY: release.build
release.build:
make push.multiarch
## help: Show this help info.
.PHONY: help
help: Makefile
@echo -e "\nUsage: make <TARGETS> <OPTIONS> ...\n\nTargets:"
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo "$$USAGE_OPTIONS"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。