mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
ci: Fix bad handling of image format names
This is what caused vagrant_vmware_fusion to not be built. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This commit is contained in:
parent
e7c519d6fd
commit
0d8e0d6b1e
13
.github/workflows/ci.yaml
vendored
13
.github/workflows/ci.yaml
vendored
@ -189,13 +189,14 @@ jobs:
|
||||
|
||||
images_out="images"
|
||||
|
||||
if echo "$formats" | tr ' ' '\n' | grep -q '^vmware'; then
|
||||
formats=$(echo "$formats" | tr ' ' '\n' | sed '/vmware.*/d')
|
||||
formats+=" vmware vmware_ova vmware_raw"
|
||||
printf -v formats "%s\n" ${formats}
|
||||
if grep -q '^vmware' <<< "${formats}"; then
|
||||
formats=$(grep -v '^vmware' <<< "${formats}")
|
||||
printf -v formats "%s\n" ${formats} vmware vmware_ova vmware_raw
|
||||
fi
|
||||
if echo "$formats" | tr ' ' '\n' | grep -q -P '^(ami|aws)'; then
|
||||
formats=$(echo "$formats" | tr ' ' '\n' | sed '/ami.*/d' | sed '/aws/d')
|
||||
formats+=" ami ami_vmdk"
|
||||
if printf "%s\n" $formats | grep -q '^ami\|^aws'; then
|
||||
formats=$(grep -v '^ami\|^aws' <<< "${formats}")
|
||||
printf -v formats "%s\n" ${formats} ami ami_vmdk
|
||||
fi
|
||||
|
||||
for format in ${formats}; do
|
||||
|
||||
@ -80,14 +80,14 @@ function _vm_build_impl() {
|
||||
apply_local_patches
|
||||
|
||||
# Convert platform names (also used to find the test scripts) to image formats they entail
|
||||
formats="$*"
|
||||
if echo "$formats" | tr ' ' '\n' | grep -q '^vmware'; then
|
||||
formats=$(echo "$formats" | tr ' ' '\n' | sed '/vmware.*/d')
|
||||
formats+=" vmware vmware_ova vmware_raw"
|
||||
printf -v formats "%s\n" ${formats}
|
||||
if grep -q '^vmware' <<< "${formats}"; then
|
||||
formats=$(grep -v '^vmware' <<< "${formats}")
|
||||
printf -v formats "%s\n" ${formats} vmware vmware_ova vmware_raw
|
||||
fi
|
||||
if echo "$formats" | tr ' ' '\n' | grep -q -P '^(ami|aws)'; then
|
||||
formats=$(echo "$formats" | tr ' ' '\n' | sed '/ami.*/d' | sed '/aws/d')
|
||||
formats+=" ami ami_vmdk"
|
||||
if printf "%s\n" $formats | grep -q '^ami\|^aws'; then
|
||||
formats=$(grep -v '^ami\|^aws' <<< "${formats}")
|
||||
printf -v formats "%s\n" ${formats} ami ami_vmdk
|
||||
fi
|
||||
|
||||
source sdk_lib/sdk_container_common.sh
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user