rancher-charts/scripts/validate

37 lines
804 B
Plaintext
Raw Normal View History

2020-07-21 20:22:47 +00:00
#!/bin/bash
set -e
cd $(dirname $0)/..
./scripts/prepare
# Remove special changes from optional flags before checking if Git is dirty
for f in packages/*; do
if [[ -f ${f}/package.yaml ]]; then
split_crds=$(cat ${f}/package.yaml | yq r - generateCRDChart.enabled)
if [[ "${split_crds}" == "true" && -d ${f}/charts-crd ]]; then
./scripts/clean-crds ${f}
fi
fi
done
2020-07-21 20:22:47 +00:00
source ./scripts/version
# Add back in special changes from optional flags
for f in packages/*; do
if [[ -f ${f}/package.yaml ]]; then
split_crds=$(cat ${f}/package.yaml | yq r - generateCRDChart.enabled)
if [[ "${split_crds}" == "true" ]]; then
./scripts/prepare-crds ${f}
fi
fi
done
2020-07-21 20:22:47 +00:00
if [ -n "$DIRTY" ]; then
echo Git is dirty
git status
exit 1
fi
./scripts/generate-charts