Update EFS tooling to track releases

This commit is contained in:
Stefan Reimer 2020-10-08 07:52:34 -07:00
parent 4285db835d
commit 54335c4c0a
3 changed files with 7 additions and 4 deletions

View File

@ -0,0 +1 @@
git

View File

@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.0.0" appVersion: "1.0.0"
name: aws-efs-csi-driver name: aws-efs-csi-driver
description: A Helm chart for AWS EFS CSI Driver description: A Helm chart for AWS EFS CSI Driver
version: 0.1.0 version: 0.2.0
kubeVersion: ">=1.14.0-0" kubeVersion: ">=1.14.0-0"
home: https://github.com/kubernetes-sigs/aws-efs-csi-driver home: https://github.com/kubernetes-sigs/aws-efs-csi-driver
sources: sources:

View File

@ -2,9 +2,11 @@
set -ex set -ex
REPO="kubernetes-sigs/aws-efs-csi-driver" REPO="kubernetes-sigs/aws-efs-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) [ -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)
URL="https://github.com/${REPO}/releases/download/${LATEST_RELEASE}/helm-chart.tgz" rm -rf git
git clone https://github.com/$REPO.git git
cd git && git checkout $RELEASE && cd -
rm -rf charts && mkdir -p charts/aws-efs-csi-driver rm -rf charts && mkdir -p charts/aws-efs-csi-driver
curl -sL "$URL" | tar xz -C charts/aws-efs-csi-driver --strip-components=1 mv git/helm/* charts/aws-efs-csi-driver