Skip to content

Commit

Permalink
unauthenticated github requests can get rate limited, fallback to usi…
Browse files Browse the repository at this point in the history
…ng plugins.yaml
  • Loading branch information
sstarcher committed Apr 20, 2020
1 parent b7edf12 commit c38596f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions install-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ getDownloadURL() {
elif type "wget" > /dev/null; then
DOWNLOAD_URL=$(wget -q -O - $latest_url | awk '/\"browser_download_url\":/{gsub( /[,\"]/,"", $2); print $2}')
fi

if [ -z "$DOWNLOAD_URL" ]; then
VERSION="$(grep "version:" "$HELM_PLUGIN_DIR/plugin.yaml" | cut -d '"' -f 2)"
DOWNLOAD_URL="https://github.com/sstarcher/helm-release/releases/download/${VERSION}/helm-release_${VERSION}_${OS}_amd64.tar.gz"
fi
}

# downloadFile downloads the latest binary package and also the checksum
Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "release"
version: "0.3.0"
version: "0.3.2"
usage: "Determines the charts next release number"
description: |-
This plugin will use environment variables and git history to divine the next chart version.
Expand Down

0 comments on commit c38596f

Please sign in to comment.