-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #435 from adambkaplan/codgegen-boilerplate
Fixes to code generators
- Loading branch information
Showing
35 changed files
with
154 additions
and
407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,12 +96,14 @@ push-image: | |
release: | ||
hack/release.sh | ||
|
||
.PHONY: gen-copyright | ||
gen-copyright: | ||
.PHONY: generate | ||
generate: | ||
hack/generate-client.sh | ||
hack/generate-fakes.sh | ||
hack/generate-copyright.sh | ||
|
||
.PHONY: verify-copyright | ||
verify-copyright: gen-copyright | ||
.PHONY: verify-codegen | ||
verify-codegen: generate | ||
# TODO: Fix travis issue with ginkgo install updating go.mod and go.sum | ||
# TODO: Verify vendor tree is accurate | ||
git diff --quiet -- ':(exclude)go.mod' ':(exclude)go.sum' ':(exclude)vendor/*' | ||
|
@@ -114,6 +116,9 @@ install-ginkgo: | |
install-gocov: | ||
cd && GO111MODULE=on go get github.com/axw/gocov/[email protected] | ||
|
||
install-counterfeiter: | ||
hack/install-counterfeiter.sh | ||
|
||
# https://github.com/shipwright-io/build/issues/123 | ||
test: test-unit | ||
|
||
|
@@ -207,6 +212,6 @@ kind: | |
./hack/install-kind.sh | ||
./hack/install-registry.sh | ||
|
||
travis: install-ginkgo install-gocov kubectl kind | ||
travis: install-counterfeiter install-ginkgo install-gocov kubectl kind | ||
./hack/install-tekton.sh | ||
./hack/install-operator-sdk.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Copyright The Shipwright Contributors | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- | ||
Copyright The Shipwright Contributors | ||
|
||
SPDX-License-Identifier: Apache-2.0 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Copyright The Shipwright Contributors | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Copyright The Shipwright Contributors | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# | ||
# Generates the typed client for Kubernetes CRDs | ||
# From https://www.openshift.com/blog/kubernetes-deep-dive-code-generation-customresources | ||
# | ||
|
||
set -euo pipefail | ||
|
||
GOPATH=${GOPATH:-$(go env GOPATH)} | ||
SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. | ||
CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../../../k8s.io/code-generator)} | ||
|
||
echo "" | ||
echo "Using code-generator package version, as instructed in the go.mod file" | ||
echo "The code-generator package is imported via the pkg/kubecodegen dir" | ||
echo "To modify the current version, please modify this in the go.mod" | ||
echo "" | ||
|
||
GOFLAGS="" GOPATH=${GOPATH} /bin/bash ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client" \ | ||
github.com/shipwright-io/build/pkg/client/build \ | ||
github.com/shipwright-io/build/pkg/apis \ | ||
build:v1alpha1 \ | ||
--go-header-file "${SCRIPT_ROOT}/hack/boilerplate.go.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
# Copyright The Shipwright Contributors | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
set -eu | ||
|
||
GO111MODULE=off go get -u github.com/maxbrunsfeld/counterfeiter |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 3 additions & 15 deletions
18
pkg/client/build/clientset/versioned/fake/clientset_generated.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.