mirror of https://git.rancher.io/charts
Deprecate providesGVR flag
This commit deprecates the providesGVR flag used by charts in favor of charts adding this annotation directly to the patch of their chart (or their Chart.yaml).pull/620/head
parent
e7b2a3934b
commit
a84d714801
|
@ -67,12 +67,6 @@ for f in packages/*; do
|
|||
if [[ "${split_crds}" == "true" ]]; then
|
||||
./scripts/clean-crds ${f}
|
||||
fi
|
||||
providesGVR="$(cat ${f}/package.yaml | yq r - providesGVR)"
|
||||
if ! [[ -z ${providesGVR} ]]; then
|
||||
if [[ "$(yq r ${f}/charts/Chart.yaml 'annotations[catalog.cattle.io/provides-gvr]')" == "${providesGVR}" ]]; then
|
||||
yq d -i ${f}/charts/Chart.yaml "annotations[catalog.cattle.io/provides-gvr]"
|
||||
fi
|
||||
fi
|
||||
diff -x *.tgz -x *.lock -uNr ${f}/charts-original ${f}/charts > ${f}/$(basename -- ${f}).patch || true
|
||||
if ! [[ -s ${f}/$(basename -- ${f}).patch ]]; then
|
||||
# If no changes exist in patch then remove it
|
||||
|
|
|
@ -44,13 +44,6 @@ for f in packages/*; do
|
|||
if [[ "${split_crds}" == "true" ]]; then
|
||||
./scripts/prepare-crds ${f}
|
||||
fi
|
||||
# Add provides GVR annotation, this lets other charts require it
|
||||
providesGVR="$(cat ${f}/package.yaml | yq r - providesGVR)"
|
||||
if ! [[ -z ${providesGVR} ]]; then
|
||||
if [[ -z "$(yq r ${f}/charts/Chart.yaml 'annotations[catalog.cattle.io/provides-gvr]')" ]]; then
|
||||
yq w -i ${f}/charts/Chart.yaml "annotations[catalog.cattle.io/provides-gvr]" "${providesGVR}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue