File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 22
33set -euo pipefail
44
5+ install_yq () {
6+ if ! command -v yq & > /dev/null; then
7+ echo " yq command not found, installing yq..."
8+ sudo curl -sSLo /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.43.1/yq_linux_amd64
9+ sudo chmod +x /usr/local/bin/yq
10+ fi
11+ }
12+ install_yq
13+
514HELM_CHART_VERSION=$1
615HELM_CHART_DIR=" helm-charts/mariadb-operator"
7- RELEASE_URL=" https://github.com/mariadb-operator/mariadb-operator/releases/download/helm-chart-$HELM_CHART_VERSION /mariadb-operator-$HELM_CHART_VERSION .tgz"
16+ HELM_CHART_FILE=" $HELM_CHART_DIR /Chart.yaml"
17+ RELEASE_URL=" https://github.com/mariadb-operator/mariadb-operator/releases/download/mariadb-operator-$HELM_CHART_VERSION /mariadb-operator-$HELM_CHART_VERSION .tgz"
818
919echo " ☸️ Syncing helm chart version $HELM_CHART_VERSION " ;
1020if [ -d " $HELM_CHART_DIR " ]; then
1121 rm -rf $HELM_CHART_DIR
1222fi
1323curl -sL $RELEASE_URL | tar xz -C helm-charts/
1424
25+ HELM_CRDS_VERSION=$( yq e ' .dependencies[] | select(.name == "mariadb-operator-crds").version' $HELM_CHART_FILE )
26+
27+ echo " ☸️ Unpacking CRDs version $HELM_CRDS_VERSION " ;
28+ tar xz -f " helm-charts/mariadb-operator/charts/mariadb-operator-crds-$HELM_CRDS_VERSION .tgz" -C " helm-charts/"
29+
1530echo " ☸️ Syncing CRDs" ;
16- cp helm-charts/mariadb-operator/ crds/crds.yaml config/manifests/crds/crds.yaml
31+ cp helm-charts/mariadb-operator- crds/templates /crds.yaml config/manifests/crds/crds.yaml
You can’t perform that action at this time.
0 commit comments