Skip to content

Commit 6decbf0

Browse files
tmshortPer Goncalves da Silva
authored and
Per Goncalves da Silva
committed
Fix generate CRD script by using copy
Using a symlink to point inside the staging directories seems to confuse newer versions of sigs.k8s.io/controller-tools. Specifically, the set up of a temporary directory for controller-gen uses a symlink into staging/api, which confuses _something_ in golang to use ${ROOT}/staging/api/go.mod rather than ${ROOT}/go.mod, causing it to return errors that indicate go.mod inconsistencies with vendor/modules.txt. This would normally be fixable via the `go mod` commands, but looking at the wrong go.mod is not a normal situation. Signed-off-by: Todd Short <[email protected]>
1 parent 56b7b9d commit 6decbf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/generate_crds_manifests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fi
3535

3636
cp -R "${ROOT_DIR}/staging/operator-lifecycle-manager/deploy/chart/" "${chartdir}"
3737
cp "${ROOT_DIR}"/values*.yaml "${tmpdir}"
38-
ln -snf $(realpath --relative-to ${tmpdir} ${ROOT_DIR}/staging/api/pkg/operators/) ${crdsrcdir}
38+
cp -R "${ROOT_DIR}/staging/api/pkg/operators/" ${crdsrcdir}
3939
rm -rf ./manifests/* ${crddir}/*
4040

4141
trap "rm -rf ${tmpdir}" EXIT

0 commit comments

Comments
 (0)