mirror of https://github.com/rancher/webhook.git
26 lines
679 B
Bash
Executable File
26 lines
679 B
Bash
Executable File
#!/bin/bash
|
|
set -eu
|
|
|
|
cd $(dirname $0)/..
|
|
. ./scripts/version
|
|
|
|
echo Running package-helm
|
|
|
|
rm -rf build/charts
|
|
mkdir -p build dist/artifacts
|
|
cp -rf charts build/
|
|
|
|
# must use sed -i'<backup_extension>'` for GNU and OSX compatibility
|
|
sed -i'.bkp' \
|
|
-e 's/^version:.*/version: '${HELM_CHART_VERSION}'/' \
|
|
-e 's/appVersion:.*/appVersion: '${HELM_CHART_VERSION}'/' \
|
|
build/charts/rancher-webhook/Chart.yaml
|
|
|
|
sed -i'.bkb' \
|
|
-e 's/tag: latest/tag: '${HELM_TAG}'/' \
|
|
build/charts/rancher-webhook/values.yaml
|
|
|
|
rm -f build/charts/rancher-webhook/Chart.yaml.bkp build/charts/rancher-webhook/values.yaml.bkb
|
|
|
|
helm package -d ./dist/artifacts ./build/charts/rancher-webhook
|