2020-05-19 14:13:41 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
|
2020-08-10 11:33:53 +00:00
|
|
|
# Upstream doesnt have proper Helm repo yet so we just download latest release and stuff it into charts
|
|
|
|
|
2020-05-19 14:13:41 +00:00
|
|
|
REPO="kubernetes-sigs/aws-ebs-csi-driver"
|
2020-10-09 18:14:51 +00:00
|
|
|
[ -z "$RELEASE" ] && 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)
|
2020-05-19 14:13:41 +00:00
|
|
|
|
2020-10-09 18:14:51 +00:00
|
|
|
rm -rf git
|
|
|
|
git clone https://github.com/$REPO.git git
|
|
|
|
cd git && git checkout $RELEASE && cd -
|
2020-05-19 14:13:41 +00:00
|
|
|
|
2020-10-09 18:14:51 +00:00
|
|
|
rm -rf charts/aws-ebs-csi-driver && mkdir -p charts/aws-ebs-csi-driver
|
|
|
|
mv git/aws-ebs-csi-driver/* charts/aws-ebs-csi-driver
|