Skip to content

Commit dce33a2

Browse files
committed
Preserve .crd.yaml suffix for manifests copied from api.
1 parent ee8492e commit dce33a2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/copy_crds.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ set -o pipefail
66

77
SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
88
CRD_PATH="${SCRIPT_ROOT}/vendor/github.com/operator-framework/api/crds"
9-
for f in ${CRD_PATH}/*.yaml ; do
9+
10+
rm "${SCRIPT_ROOT}"/deploy/chart/crds/*.yaml
11+
for f in "${CRD_PATH}"/*.yaml ; do
1012
if [[ ! "${f}" =~ .*_operators\.yaml ]]; then
1113
echo "copying ${f}"
12-
cp "${f}" "${SCRIPT_ROOT}/deploy/chart/crds/0000_50_olm_00-${f##*/operators.coreos.com_}"
14+
cp "${f}" "${SCRIPT_ROOT}/deploy/chart/crds/0000_50_olm_00-$(basename "$f" | sed 's/^.*_\([^.]\+\)\.yaml/\1.crd.yaml/')"
1315
fi
1416
done
1517

0 commit comments

Comments
 (0)