952bc590ba
Ensure that the output of tools/normalize_channels_yaml.py matches gerritbot/channels.yaml modulo any comments. Change-Id: I3147cb094a795aeeffcceda182d065ed5145c2dd Depends-On: Ia710997f37e8fba4a18b26577ecac42dd3137e2a
13 lines
408 B
Bash
Executable File
13 lines
408 B
Bash
Executable File
#!/bin/bash
|
|
|
|
T=$(mktemp -d)
|
|
trap "rm -rf $T" EXIT
|
|
|
|
channels_file=${1:-gerritbot/channels.yaml}
|
|
|
|
# strip comments so that output can be compared meaningfully
|
|
(printf "# This file is sorted alphabetically by channel name.\n"; sed '/^[[:space:]]*#.*$/d;s/[[:space:]]*#.*$//' gerritbot/channels.yaml) > $T/comments-removed
|
|
./tools/normalize_channels_yaml.py >$T/regenned
|
|
|
|
diff -u $T/comments-removed $T/regenned
|