代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/Jenkins-x 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
CODE_GEN_BIN_NAME := codegen
CODE_GEN_GO_DEPENDENCIES := $(call rwildcard,cmd/codegen/,*.go)
CODE_GEN_BUILDFLAGS :=
ifdef DEBUG
CODE_GEN_BUILDFLAGS := -gcflags "all=-N -l" $(CODE_GEN_BUILDFLAGS)
endif
PEGOMOCK_VERSION := v2.7.0
CLIENTSET_GENERATOR_VERSION := kubernetes-1.15.12
GEN_APIDOCS_VERSION := v0.0.0-20190912061656-a61bc210ee54
OPENAPI_GEN_VERSION := 36ebc4887cdc
build-codegen: build/$(CODE_GEN_BIN_NAME) ## Build the code generator
build/$(CODE_GEN_BIN_NAME): $(CODE_GEN_GO_DEPENDENCIES)
CGO_ENABLED=$(CGO_ENABLED) $(GO) build $(CODE_GEN_BUILDFLAGS) -o build/$(CODE_GEN_BIN_NAME) cmd/codegen/codegen.go
test-codegen: ## Test the code geneator
CGO_ENABLED=$(CGO_ENABLED) $(GO) test -v -short ./cmd/codegen/...
# Generate go code using generate directives in files and kubernetes code generation
# Anything generated by this target should be checked in
generate: build-codegen install-generate-deps generate-mocks generate-client ## Generate the Go code (crds, mocks, openapi, client)
@$(MAKE) fmt
@$(MAKE) importfmt
@echo "Generation complete"
install-generate-deps:
$(GO) get github.com/petergtz/pegomock/...@$(PEGOMOCK_VERSION)
generate-mocks: install-generate-deps go-generate fmt importfmt ## Generate the mocks
go-generate:
@echo "Generating Mocks using pegomock"
$(GO) generate ./...
generate-client: codegen-config fmt importfmt ## Generate the client
codegen-config: build-codegen ## Generate the deepcopy for the config, jenkinsfile, and tekton/syntax packages
# sleep for one second to prevent collision with previous codegen's replacement of go.mod
sleep 1
./build/$(CODE_GEN_BIN_NAME) --generator-version $(CLIENTSET_GENERATOR_VERSION) clientset --generator deepcopy --output-package=pkg --input-package=v2/pkg --group-with-version=config: --group-with-version=jenkinsfile: --group-with-version=tekton:syntax --semver=v2
# Generated docs are not checked in
generate-docs: build-codegen ## Generate the docs
@echo "Generating HTML docs for Kubernetes Clients"
./build/$(CODE_GEN_BIN_NAME) --generator-version $(GEN_APIDOCS_VERSION) docs
install-refdocs:
$(GO) get github.com/jenkins-x/gen-crd-api-reference-docs
stash:
# Making sure repo has no outstanding changes
git stash
# Verifies that generated code is in sync with implementation
verify-generation-complete: stash generate ## Verify the generated code is up to date
$(eval CHANGED = $(shell git ls-files --modified --others --exclude-standard))
@if [ "$(CHANGED)" == "" ]; \
then \
echo "All generated files up to date"; \
else \
echo "Code generation is out of date"; \
echo "$(CHANGED)"; \
git diff; \
exit 1; \
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。