Skip to content

Commit e1d5124

Browse files
authored
Merge pull request #957 from csonezp/fix_quickstart
fix: add token to avoid github api rate limit
2 parents 162ffd3 + 7e0dcbb commit e1d5124

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

hack/quick-start/quickstart.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ function init() {
2323
}
2424

2525
function getLatestReleaseVersion() {
26-
latestVersion=$(curl -s https://api.github.com/repos/devstream-io/devstream/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
26+
if [ -n "${GITHUB_TOKEN}" ]; then
27+
AUTH_HEADER="-H Authorization: token ${GITHUB_TOKEN}"
28+
fi
29+
30+
latestVersion=$(curl ${AUTH_HEADER} -s https://api.github.com/repos/devstream-io/devstream/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
2731
if [ -z "$latestVersion" ]; then
2832
echo "Failed to get latest release version"
2933
exit 1

0 commit comments

Comments
 (0)