#!/bin/bash cd "$(dirname "$0")" ( set -e eval "$(yq -o json . Chart.yaml | jq -r '.dependencies[0] | @sh "CHART=\(.name)\nVERSION=\(.version)\nREPO=\(.repository)"')" helm template argocd-crds "$CHART" --repo "$REPO" --version "$VERSION" | yq 'select(.kind == "CustomResourceDefinition")' | kubectl apply -f - ) RC=$? if [ $RC -ne 0 ];then 1>&2 echo "exiting due to error" exit $RC fi