Skip to content

Commit

Permalink
Update templates generation to support multiple versions
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Pavlov <[email protected]>
  • Loading branch information
Kshatrix committed Oct 7, 2024
1 parent 89bb75e commit 2d022ba
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hack/templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ for type in "$TEMPLATES_DIR"/*; do
if [ "$name" = "$HMC_TEMPLATES_CHART_NAME" ]; then continue; fi
version=$(grep '^version:' $chart/Chart.yaml | awk '{print $2}')
template_name=$name-$(echo "$version" | sed 's/^v//; s/\./-/g')
if [ "$kind" = "ProviderTemplate" ]; then file_name=$name; else file_name=$template_name; fi

cat <<EOF > $TEMPLATES_OUTPUT_DIR/$name.yaml
cat <<EOF > $TEMPLATES_OUTPUT_DIR/$file_name.yaml
apiVersion: hmc.mirantis.com/v1alpha1
kind: $kind
EOF
cat <<EOF >> $TEMPLATES_OUTPUT_DIR/$name.yaml
cat <<EOF >> $TEMPLATES_OUTPUT_DIR/$file_name.yaml
metadata:
name: $template_name
annotations:
Expand Down

0 comments on commit 2d022ba

Please sign in to comment.