From 4c6339b8478e8ec8637e974c323990324b77f2a7 Mon Sep 17 00:00:00 2001 From: Joe Date: Wed, 7 Feb 2024 15:30:10 -0500 Subject: [PATCH] fix PR generation --- .gitignore | 1 + packer/gen-native-images.sh | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index af8e66d..776c019 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Ignore packer manifest packer-manifest.json +govcloud-packer-manifest.json snippet-*.json *.pkrvars.json diff --git a/packer/gen-native-images.sh b/packer/gen-native-images.sh index f5b61ca..a664a19 100755 --- a/packer/gen-native-images.sh +++ b/packer/gen-native-images.sh @@ -39,7 +39,8 @@ do ')" arch="amd64" - [ "${name/arm64/}" != "arm64" ] && arch="arm64" + [ "${name/arm64/}" != $name ] && arch="arm64" + nicename="${nicename/-arm64/ (arm64)}" echo " $nicename images:" @@ -99,7 +100,8 @@ done echo "[$json ]" >snippet-temp.json -jq '. | map(select(.Name == "Docker-Duplo-Oregon-Ubuntu22") | .Name = "Docker-Duplo") + .' snippet-NativeImages.json +jq '. | map(select(.Name == "Docker-Duplo-Oregon-Ubuntu22" and .Arch == "amd64") | .Name = "Docker-Duplo") + .' snippet-temp2.json +jq '. | map(select(.Name == "Docker-Duplo-Oregon-Ubuntu22 (arm64)" and .Arch == "arm64") | .Name = "Docker-Duplo (arm64)") + .' snippet-NativeImages.json out "NativeImages JSON: snippet done" # Step 2 - Build a new native images JSON