Skip to content

Commit

Permalink
Move YAML document separator to top of release manifests (GoogleCloud…
Browse files Browse the repository at this point in the history
…Platform#799)

Move the YAML document separator inserted as part of `make-release-artifacts.sh` to the top of each manifest rather than the bottom.

Having the separator at the end of the manifest results in the generated release YAML files containing an empty document at the end. Whilst this is valid YAML, it is untidy, and certain YAML tools (`yq`) have been seen to handle empty document elements badly.
  • Loading branch information
dsbibby committed Apr 12, 2022
1 parent 94e4a99 commit d87ca09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hack/make-release-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ read_manifests() {
dir="$1"

while IFS= read -d $'\0' -r file; do
echo "---"

# strip license headers (pattern "^# ")
awk '
/^[^# ]/ { found = 1 }
found { print }' "${file}"

echo "---"
done < <(find "${dir}" -name '*.yaml' -type f -print0)
}

Expand Down

0 comments on commit d87ca09

Please sign in to comment.