mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 15:20:11 +00:00
[Ubuntu] Implement helper to get GitHub package download URL (#4947)
This commit is contained in:
committed by
GitHub
parent
cb8931646f
commit
404da76e17
@@ -7,11 +7,8 @@
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
KOTLIN_ROOT="/usr/share"
|
||||
|
||||
kotlinReleasesUrl="https://api.github.com/repos/JetBrains/kotlin/releases"
|
||||
latestRelease=$(curl -s $kotlinReleasesUrl | jq -r 'map(select(.prerelease == false)) | sort_by(.target_commitish)[-1]')
|
||||
URL=$(echo $latestRelease | jq -r '.assets[].browser_download_url | select(contains("kotlin-compiler"))')
|
||||
download_with_retries $URL "/tmp"
|
||||
downloadUrl=$(get_github_package_download_url "JetBrains/kotlin" "contains(\"kotlin-compiler\")")
|
||||
download_with_retries "$downloadUrl" "/tmp"
|
||||
|
||||
unzip -qq /tmp/kotlin-compiler*.zip -d $KOTLIN_ROOT
|
||||
rm $KOTLIN_ROOT/kotlinc/bin/*.bat
|
||||
|
||||
Reference in New Issue
Block a user