From 0ea72fc11b4fb53ee9dc1862a3f3e9cd56d250a5 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 18 Oct 2023 14:30:47 +0200 Subject: [PATCH] .github/workflow: removing trailing spaces in calico manifest it happens that manifest have trailing space at the end of the key/value. The diff wants to remove the trailing space so it fails when applying the generated patch. Signed-off-by: Mathieu Tortuyaux --- .github/workflows/sync-calico-version.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sync-calico-version.sh b/.github/workflows/sync-calico-version.sh index 98bf9546b..69deeecb0 100755 --- a/.github/workflows/sync-calico-version.sh +++ b/.github/workflows/sync-calico-version.sh @@ -36,10 +36,12 @@ files=( $(git grep 'Source: https://raw\.githubusercontent\.com/projectcalico/ca # - download the new manifest new_link="https://raw.githubusercontent.com/projectcalico/calico/${calico_version}/manifests/custom-resources.yaml" wget "${new_link}" +sed -i 's/[[:space:]]*$//' custom-resources.yaml mv custom-resources.yaml throw-away/custom-resources-new.yaml # - download the old version of manifest old_link=$(git grep -nA1 -e 'cat << EOF > calico.yaml' -- kola/tests/kubeadm/templates.go | tail -n 1 | sed -e 's/^.*Source: //') wget "${old_link}" +sed -i 's/[[:space:]]*$//' custom-resources.yaml mv custom-resources.yaml throw-away/custom-resources-old.yaml # - for each of the using files do for file in "${files[@]}"; do