KubeZero/charts/kubezero-aws-ebs/update.sh

11 lines
414 B
Bash
Executable File

#!/bin/bash
set -ex
REPO="kubernetes-sigs/aws-ebs-csi-driver"
LATEST_RELEASE=$(curl -sL -s https://api.github.com/repos/${REPO}/releases | grep '"tag_name":' | cut -d'"' -f4 | grep -v -E "(alpha|beta|rc)" | sort -t"." -k 1,1 -k 2,2 -k 3,3 -k 4,4 | tail -n 1)
URL="https://github.com/${REPO}/releases/download/${LATEST_RELEASE}/helm-chart.tgz"
rm -rf charts/aws-ebs-csi-driver
curl -sL "$URL" | tar xz -C charts