Skip to content

Commit

Permalink
.github/workflow: removing trailing spaces in calico manifest
Browse files Browse the repository at this point in the history
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 <mtortuyaux@microsoft.com>
  • Loading branch information
tormath1 committed Oct 18, 2023
1 parent 20a2f8f commit 0ea72fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/sync-calico-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0ea72fc

Please sign in to comment.