TrueChartsClone/.tools/copy-common.sh

38 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/sh
for chart in stable/*; do
if [ -d "${chart}" ]; then
maxfolderversion=$(ls -l ${chart} | grep ^d | awk '{print $9}' | tail -n 1)
chartname=$(basename ${chart})
echo "Processing: ${chart} - folder: ${maxfolderversion} - version: ${maxchartversion}"
rm -Rf ${chart}/${maxfolderversion}/charts/*.tgz
cp -f library/common-test/charts/* ${chart}/${maxfolderversion}/charts/
fi
done
for chart in beta/*; do
if [ -d "${chart}" ]; then
maxfolderversion=$(ls -l ${chart} | grep ^d | awk '{print $9}' | tail -n 1)
chartname=$(basename ${chart})
echo "Processing: ${chart} - folder: ${maxfolderversion} - version: ${maxchartversion}"
rm -Rf ${chart}/${maxfolderversion}/charts/*.tgz
cp -f library/common-test/charts/* ${chart}/${maxfolderversion}/charts/
fi
done
for chart in staging/*; do
if [ -d "${chart}" ]; then
maxfolderversion=$(ls -l ${chart} | grep ^d | awk '{print $9}' | tail -n 1)
chartname=$(basename ${chart})
echo "Processing: ${chart} - folder: ${maxfolderversion} - version: ${maxchartversion}"
rm -Rf ${chart}/${maxfolderversion}/charts/*.tgz
cp -f library/common-test/charts/* ${chart}/${maxfolderversion}/charts/
fi
done