mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
99595f5fab
Omit go version control information (buildvcs), otherwise go command fails to obtain vcs status as shown below: error obtaining VCS status: exit status 128 Use -buildvcs=false to disable VCS stamping. Signed-off-by: Muyassarov, Feruzjon <feruzjon.muyassarov@intel.com>
34 lines
943 B
Bash
Executable file
34 lines
943 B
Bash
Executable file
#!/bin/bash -e
|
|
set -o pipefail
|
|
|
|
# Default path for code-generator repo
|
|
K8S_CODE_GENERATOR=${K8S_CODE_GENERATOR:-../code-generator}
|
|
# Omit version control information (buildvcs)
|
|
export GOENV="/go/env"
|
|
go env -w GOFLAGS="-buildvcs=false"
|
|
|
|
go mod vendor
|
|
|
|
go generate ./cmd/... ./pkg/... ./source/...
|
|
|
|
rm -rf vendor/
|
|
|
|
controller-gen object crd output:crd:stdout paths=./pkg/apis/... > deployment/base/nfd-crds/nfd-api-crds.yaml
|
|
|
|
mkdir -p deployment/helm/node-feature-discovery/crds
|
|
cp deployment/base/nfd-crds/nfd-api-crds.yaml deployment/helm/node-feature-discovery/crds
|
|
|
|
rm -rf sigs.k8s.io
|
|
|
|
${K8S_CODE_GENERATOR}/generate-groups.sh client,informer,lister \
|
|
sigs.k8s.io/node-feature-discovery/pkg/generated \
|
|
sigs.k8s.io/node-feature-discovery/pkg/apis \
|
|
"nfd:v1alpha1" --output-base=. \
|
|
--go-header-file hack/boilerplate.go.txt
|
|
|
|
rm -rf pkg/generated
|
|
|
|
mv sigs.k8s.io/node-feature-discovery/pkg/generated pkg/
|
|
|
|
rm -rf sigs.k8s.io
|
|
|