Skip to content

Commit

Permalink
fix PR generation
Browse files Browse the repository at this point in the history
  • Loading branch information
joek-duplo committed Feb 7, 2024
1 parent 0044944 commit 4c6339b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Ignore packer manifest
packer-manifest.json
govcloud-packer-manifest.json
snippet-*.json
*.pkrvars.json

Expand Down
6 changes: 4 additions & 2 deletions packer/gen-native-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ do
')"

arch="amd64"
[ "${name/arm64/}" != "arm64" ] && arch="arm64"
[ "${name/arm64/}" != $name ] && arch="arm64"
nicename="${nicename/-arm64/ (arm64)}"

echo "
$nicename images:"
Expand Down Expand Up @@ -99,7 +100,8 @@ done

echo "[$json
]" >snippet-temp.json
jq '. | map(select(.Name == "Docker-Duplo-Oregon-Ubuntu22") | .Name = "Docker-Duplo") + .' <snippet-temp.json >snippet-NativeImages.json
jq '. | map(select(.Name == "Docker-Duplo-Oregon-Ubuntu22" and .Arch == "amd64") | .Name = "Docker-Duplo") + .' <snippet-temp.json >snippet-temp2.json
jq '. | map(select(.Name == "Docker-Duplo-Oregon-Ubuntu22 (arm64)" and .Arch == "arm64") | .Name = "Docker-Duplo (arm64)") + .' <snippet-temp2.json >snippet-NativeImages.json
out "NativeImages JSON: snippet done"

# Step 2 - Build a new native images JSON
Expand Down

0 comments on commit 4c6339b

Please sign in to comment.