Skip to content

Commit

Permalink
Merge pull request #80 from LaurentGoderre/index-munging-verification
Browse files Browse the repository at this point in the history
Modify index munge for verification
  • Loading branch information
tianon authored Sep 20, 2024
2 parents 3f90094 + ba66c70 commit cc821f3
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 cc821f3

Please sign in to comment.