Skip to content

Commit

Permalink
fix: download latest ktlint version without github token (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaiszaher authored Jul 21, 2023
1 parent 3899f33 commit 8b728e4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ export BASELINE=
export CUSTOM_RULE_PATH=

if [ "$INPUT_KTLINT_VERSION" = "latest" ]; then
curl -sSL https://api.github.com/repos/pinterest/ktlint/releases/latest --header "authorization: Bearer ${INPUT_GITHUB_TOKEN}" |
grep "browser_download_url.*ktlint\"" |
cut -d : -f 2,3 |
tr -d \" |
wget -qi - &&
curl -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktlint &&
chmod a+x ktlint &&
mv ktlint /usr/local/bin/
else
Expand Down

0 comments on commit 8b728e4

Please sign in to comment.