This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 #2312 from fluxcd/build/intergrations
Fix generated file check, and file generation
- Loading branch information
Showing
5 changed files
with
66 additions
and
50 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
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 |
---|---|---|
|
@@ -4,12 +4,26 @@ set -o errexit | |
set -o nounset | ||
set -o pipefail | ||
|
||
# This corresponds to the tag kubernetes-1.14.4, and to the pinned version in go.mod | ||
CODEGEN_VERSION="[email protected]" | ||
SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/../.. | ||
CODEGEN_PKG=${CODEGEN_PKG:-$(echo `go env GOPATH`'/pkg/mod/k8s.io/[email protected]')} | ||
|
||
go mod download # make sure the code-generator is downloaded | ||
env GOPATH=`go env GOPATH` bash ${CODEGEN_PKG}/generate-groups.sh all github.com/weaveworks/flux/integrations/client \ | ||
# Chosen to line up with the ./build directory used in the Makefile | ||
CODEGEN_ROOT=./build/codegen | ||
# make sure this exists ... | ||
mkdir -p ./build | ||
# ... but not this | ||
rm -rf ${CODEGEN_ROOT} | ||
|
||
echo Using codegen in ${CODEGEN_ROOT} | ||
|
||
export GO111MODULE=on | ||
# make sure the codegen module has been fetched | ||
go mod download | ||
cp -R $(echo `go env GOPATH`)'/pkg/mod/k8s.io/'${CODEGEN_VERSION} ${CODEGEN_ROOT} | ||
chmod -R u+w ${CODEGEN_ROOT} | ||
|
||
bash "${CODEGEN_ROOT}/generate-groups.sh" all github.com/weaveworks/flux/integrations/client \ | ||
github.com/weaveworks/flux/integrations/apis \ | ||
"flux.weave.works:v1beta1 helm.integrations.flux.weave.works:v1alpha2" \ | ||
--go-header-file "${SCRIPT_ROOT}/bin/helm/custom-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
Oops, something went wrong.