Skip to content

Commit

Permalink
Modify index munge for verification
Browse files Browse the repository at this point in the history
Preserves the image.ref.name annotatoon and set it to the first arch tag
  • Loading branch information
LaurentGoderre committed Sep 20, 2024
1 parent 4a6c57a commit ba66c70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .test/meta-commands/out.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ tar -xvf temp.tar -C temp
rm temp.tar
jq '
.manifests |= (
del(.[].annotations)
| unique
unique_by([ .digest, .size, .mediaType ])
| if length != 1 then
error("unexpected number of manifests: " + length)
error("unexpected number of manifests: \(length)")
else . end
)
' temp/index.json > temp/index.json.new
Expand Down
5 changes: 2 additions & 3 deletions meta.jq
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,9 @@ def build_command:
# munge the index to what crane wants ("Error: layout contains 5 entries, consider --index")
@sh "jq \("
.manifests |= (
del(.[].annotations)
| unique
unique_by([ .digest, .size, .mediaType ])
| if length != 1 then
error(\"unexpected number of manifests: \" + length)
error(\"unexpected number of manifests: \\(length)\")
else . end
)
" | unindent_and_decomment_jq(3)) temp/index.json > temp/index.json.new",
Expand Down

0 comments on commit ba66c70

Please sign in to comment.