Sync scripts with rancher/charts

pull/48/head
Steven Crespo 2020-10-16 16:55:18 -07:00
parent 693c08aece
commit f127f71327
2 changed files with 6 additions and 4 deletions

View File

@ -1,2 +1,2 @@
# ${name}-crd # ${name}-crd
A Rancher chart that installs the CRDs used by [${name}](https://github.com/rancher/dev-charts/tree/master/packages/${name}). A Rancher chart that installs the CRDs used by ${name}.

View File

@ -13,9 +13,10 @@ fi
for f in packages/*; do for f in packages/*; do
rm -rf ./sha256sum-new/$(basename -- ${f}) rm -rf ./sha256sum-new/$(basename -- ${f})
mkdir -p ./sha256sum-new/$(basename -- ${f}) mkdir -p ./sha256sum-new/$(basename -- ${f})
find ${f} -type f | xargs sha256sum > ./sha256sum-new/$(basename -- ${f})/$(basename -- ${f}).sum find ${f} -type f | sort | xargs sha256sum > ./sha256sum-new/$(basename -- ${f})/$(basename -- ${f}).sum
done done
# If there were no sha256sums in the first place, output the name of every chart
if [ ! -d sha256sum ]; then if [ ! -d sha256sum ]; then
cp -R sha256sum-new sha256sum cp -R sha256sum-new sha256sum
for f in packages/*; do for f in packages/*; do
@ -23,8 +24,9 @@ if [ ! -d sha256sum ]; then
done done
fi fi
for f in sha256sum/*; do # For all the new sha256sums that were generated, compare them and see if the existing assets need to be rebuilt
if ! cmp -s ./sha256sum-new/$(basename -- ${f})/$(basename -- ${f}).sum ${f}/$(basename -- ${f}).sum; then for f in sha256sum-new/*; do
if ! cmp -s ./sha256sum/$(basename -- ${f})/$(basename -- ${f}).sum ${f}/$(basename -- ${f}).sum; then
echo $(basename -- ${f}) echo $(basename -- ${f})
fi fi
done done