Skip to content

Commit

Permalink
fix: checksum search for Kotlin (actions#8704)
Browse files Browse the repository at this point in the history
* [Ubuntu] Fix checksum search for Kotlin

* [Windows] Fixed checksum search for Kotlin
  • Loading branch information
frittsy authored Nov 1, 2023
1 parent 2094c7e commit cdbbd8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion images/linux/scripts/installers/kotlin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ download_url=$(get_github_package_download_url "JetBrains/kotlin" "contains(\"ko
download_with_retries "$download_url" "/tmp" "$kotlin_zip_name"

# Supply chain security - Kotlin
kotlin_hash=$(get_github_package_hash "JetBrains" "kotlin" "kotlin-compiler" "" "latest" "false" "|" 3)
kotlin_hash=$(get_github_package_hash "JetBrains" "kotlin" "kotlin-compiler-.*\.zip" "" "latest" "false" "|" 3)
use_checksum_comparison "/tmp/${kotlin_zip_name}" "$kotlin_hash"

unzip -qq /tmp/${kotlin_zip_name} -d $KOTLIN_ROOT
Expand Down
2 changes: 1 addition & 1 deletion images/win/scripts/Installers/Install-Kotlin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $kotlinInstallerPath = Start-DownloadWithRetry -Url $kotlinDownloadUrl -Name "$k

#region Supply chain security
$fileHash = (Get-FileHash -Path $kotlinInstallerPath -Algorithm SHA256).Hash
$externalHash = Get-HashFromGitHubReleaseBody -RepoOwner "JetBrains" -RepoName "kotlin" -FileName "$kotlinBinaryName" -Version $kotlinVersion -WordNumber 2
$externalHash = Get-HashFromGitHubReleaseBody -RepoOwner "JetBrains" -RepoName "kotlin" -FileName "$kotlinBinaryName-*.zip" -Version $kotlinVersion -WordNumber 2
Use-ChecksumComparison $fileHash $externalHash
#endregion

Expand Down

0 comments on commit cdbbd8a

Please sign in to comment.