Skip to content

Commit

Permalink
Fix update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
keeganwitt committed Jun 16, 2024
1 parent 90ea9aa commit c050236
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dir -Recurse -Filter Dockerfile | ForEach-Object {
(Get-Content -Path $_.FullName) -replace "GRAALVM_AMD64_DOWNLOAD_SHA256=[^ ]+", "GRAALVM_AMD64_DOWNLOAD_SHA256=${graal21amd64Hash}" | Set-Content $_.FullName
(Get-Content -Path $_.FullName) -replace "GRAALVM_AARCH64_DOWNLOAD_SHA256=[^ ]+", "GRAALVM_AARCH64_DOWNLOAD_SHA256=${graal21aarch64Hash}" | Set-Content $_.FullName
}
elseif ($((Get-Item $_.FullName).Directory.Name) -eq "jdk21and22-graal")
elseif ($((Get-Item $_.FullName).Directory.Name) -eq "jdk-lts-and-current-graal")
{
(Get-Content -Path $_.FullName) -replace "JAVA_21_VERSION=[^ ]+", "JAVA_21_VERSION=${graal21Version}" | Set-Content $_.FullName
(Get-Content -Path $_.FullName) -replace "GRAALVM_21_AMD64_DOWNLOAD_SHA256=[^ ]+", "GRAALVM_21_AMD64_DOWNLOAD_SHA256=${graal21amd64Hash}" | Set-Content $_.FullName
Expand Down
6 changes: 3 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ sed --regexp-extended --in-place "s/GRAALVM_AMD64_DOWNLOAD_SHA256=[^ ]+/GRAALVM_
sed --regexp-extended --in-place "s/GRAALVM_AARCH64_DOWNLOAD_SHA256=[^ ]+/GRAALVM_AARCH64_DOWNLOAD_SHA256=${graal21aarch64Sha}/" ./jdk21-graal/Dockerfile

graal22Version=$( curl --silent --location 'https://api.github.com/repos/graalvm/graalvm-ce-builds/releases?per_page=12&page=1' | jq -r 'map(select(.tag_name | contains("jdk-22"))) | .[0].tag_name | sub("jdk-"; "")')
sed --regexp-extended --in-place "s/JAVA_VERSION=[^ ]+/JAVA_VERSION=${graal22Version}/" ./jdk21and22-graal/Dockerfile
sed --regexp-extended --in-place "s/JAVA_VERSION=[^ ]+/JAVA_VERSION=${graal22Version}/" ./jdk-lts-and-current-graal/Dockerfile
graal22amd64Sha=$(curl --fail --location --silent "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${graal22Version}/graalvm-community-jdk-${graal22Version}_linux-x64_bin.tar.gz" | sha256sum | cut -d' ' -f1)
graal22aarch64Sha=$(curl --fail --location --silent "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${graal22Version}/graalvm-community-jdk-${graal22Version}_linux-aarch64_bin.tar.gz" | sha256sum | cut -d' ' -f1)
sed --regexp-extended --in-place "s/GRAALVM_AMD64_DOWNLOAD_SHA256=[^ ]+/GRAALVM_AMD64_DOWNLOAD_SHA256=${graal22amd64Sha}/" ./jdk21and22-graal/Dockerfile
sed --regexp-extended --in-place "s/GRAALVM_AARCH64_DOWNLOAD_SHA256=[^ ]+/GRAALVM_AARCH64_DOWNLOAD_SHA256=${graal22aarch64Sha}/" ./jdk21and22-graal/Dockerfile
sed --regexp-extended --in-place "s/GRAALVM_AMD64_DOWNLOAD_SHA256=[^ ]+/GRAALVM_AMD64_DOWNLOAD_SHA256=${graal22amd64Sha}/" ./jdk-lts-and-current-graal/Dockerfile
sed --regexp-extended --in-place "s/GRAALVM_AARCH64_DOWNLOAD_SHA256=[^ ]+/GRAALVM_AARCH64_DOWNLOAD_SHA256=${graal22aarch64Sha}/" ./jdk-lts-and-current-graal/Dockerfile

echo "Latest Gradle version is ${gradleVersion}"
echo "Latest Graal 17 version is ${graal17Version}"
Expand Down

0 comments on commit c050236

Please sign in to comment.