Skip to content

Commit e95f6ba

Browse files
authored
Move YAML document separator to top of release manifests (GoogleCloudPlatform#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.
1 parent 4a1d08b commit e95f6ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hack/make-release-artifacts.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ read_manifests() {
5151
dir="$1"
5252

5353
while IFS= read -d $'\0' -r file; do
54+
echo "---"
55+
5456
# strip license headers (pattern "^# ")
5557
awk '
5658
/^[^# ]/ { found = 1 }
5759
found { print }' "${file}"
58-
59-
echo "---"
6060
done < <(find "${dir}" -name '*.yaml' -type f -print0)
6161
}
6262

0 commit comments

Comments
 (0)