From 6ea1e8d3556d434f4961dcb3f4b2382044a3d633 Mon Sep 17 00:00:00 2001 From: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> Date: Mon, 17 Oct 2022 17:06:25 -0400 Subject: [PATCH] Verify that schema files are correctly published (#2868) This downloads the schema files from https://opentelemetry.io/schemas/ and verifies their content. Next time we make a release this will force us to make sure https://github.com/open-telemetry/opentelemetry.io repo is updated before we make the release. This helps prevent issues like https://github.com/open-telemetry/opentelemetry.io/issues/1846 Also add release procedure to the docs. --- internal/tools/schema_check.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/tools/schema_check.sh b/internal/tools/schema_check.sh index bbe021977..52063d3dd 100755 --- a/internal/tools/schema_check.sh +++ b/internal/tools/schema_check.sh @@ -31,6 +31,13 @@ grep -o -e '## v[1-9].*\s' $root_dir/CHANGELOG.md | grep -o '[1-9].*' | while re echo "FAILED: $file does not exist. The schema file must exist because the version is declared in CHANGELOG.md." exit 3 fi + + curl --no-progress-meter https://opentelemetry.io/schemas/$ver > verify$ver + + diff verify$ver $file && echo "Published schema at https://opentelemetry.io/schemas/$ver is correct" \ + || (echo "Published schema at https://opentelemetry.io/schemas/$ver is incorrect!" && exit 3) + + rm verify$ver done # Now check the content of all schema files in the ../shemas directory.