mirror of
https://github.com/hahow/common-chart.git
synced 2026-08-20 18:06:25 +00:00
21 lines
473 B
Bash
Executable File
21 lines
473 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
|
|
if [[ $# -eq 0 ]]
|
|
then
|
|
echo "Usage: create-chart.sh <chartname>"
|
|
exit 1
|
|
fi
|
|
|
|
CHART_NAME=$1
|
|
|
|
echo "Creating chart..."
|
|
mkdir "$CHART_NAME"
|
|
curl --proto '=https' --tlsv1.2 -sSf https://codeload.github.com/hahow/common-chart/tar.gz/master | \
|
|
tar -xz -C "$CHART_NAME" --strip=2 common-chart-master/starter
|
|
find "$CHART_NAME" -type f | xargs sed -i"" "s/<CHARTNAME>/$CHART_NAME/g"
|
|
|
|
echo "Building dependencies..."
|
|
helm dep build "$CHART_NAME"
|