Skip to content

Commit

Permalink
Merge pull request #1654 from GoogleContainerTools/jq-compat
Browse files Browse the repository at this point in the history
Fix jq query for compat with jq 1.6 (github actions)
  • Loading branch information
loosebazooka authored Sep 4, 2024
2 parents ba85a69 + d85bdff commit f101950
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-temurin-packages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: update-snapshots
name: update-temurin-packages
on:
# will send emails to last editor of this cron syntax (distroless-bot)
schedule:
Expand Down
2 changes: 1 addition & 1 deletion knife
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ update-java-archives)
cmd_update_java_archives
;;
~~nocmd) # no command provided
echo "provide a command: lock, update-snapshots, github-update-snapshots, test"
echo "provide a command: lock, update-snapshots, github-update-snapshots, update-java-archives, test"
exit 1
;;
*) # unknown command
Expand Down
4 changes: 2 additions & 2 deletions scripts/update_java_archives.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ EOM
arch=${archs[arch_index]}
arch_deb=${archs_deb[arch_index]}
name="OpenJDK21U-${variant}_${arch}_linux_hotspot_$(underscore_encode "${version}").tar.gz"
archive_url=$(echo "$latest_release" | jq -r --arg NAME "$name" '.assets.[] | select(.name==$NAME) | .browser_download_url')
archive_url=$(echo "$latest_release" | jq -r --arg NAME "$name" '.assets | .[] | select(.name==$NAME) | .browser_download_url')
[ "$archive_url" ] || { echo "no url found for ${name}"; exit 1; }
sha256_name="${name}.sha256.txt"
sha256_url=$(echo "$latest_release" | jq -r --arg NAME "$sha256_name" '.assets.[] | select(.name==$NAME) | .browser_download_url')
sha256_url=$(echo "$latest_release" | jq -r --arg NAME "$sha256_name" '.assets | .[] | select(.name==$NAME) | .browser_download_url')
[ "$sha256_url" ] || { echo "no url found for ${sha256_name}"; exit 1; }
sha256=$(curl -sSL "$sha256_url" | cut -d' ' -f1)
[ "$sha256" ] || { echo "no sha256 downloaded for ${name}"; exit 1; }
Expand Down

0 comments on commit f101950

Please sign in to comment.