From c03261831f125e7c11f8322e46e6ab73597958a3 Mon Sep 17 00:00:00 2001 From: Greg <2582552+gdvalle@users.noreply.github.com> Date: Wed, 4 Sep 2024 14:19:47 -0500 Subject: [PATCH] ci: sort with dictionary mode for compatibility (#1388) --- .github/ISSUE_TEMPLATE/bug_report.yaml | 3 +-- .github/ISSUE_TEMPLATE/change_proposal.yaml | 3 +-- .github/ISSUE_TEMPLATE/new-conventions.yaml | 3 +-- .github/workflows/scripts/get-registry-areas.sh | 16 ++++++++++++++++ 4 files changed, 19 insertions(+), 6 deletions(-) create mode 100755 .github/workflows/scripts/get-registry-areas.sh diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index e4e6d6b430..3727362773 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -28,9 +28,8 @@ body: - area:browser - area:cicd - area:client - - area:cloud - area:cloudevents - - area:cloudfoundry + - area:cloud - area:code - area:container - area:cpu diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index 4c9316ddf1..66ca32a455 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -20,9 +20,8 @@ body: - area:browser - area:cicd - area:client - - area:cloud - area:cloudevents - - area:cloudfoundry + - area:cloud - area:code - area:container - area:cpu diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index e6e543158e..815d472020 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -29,9 +29,8 @@ body: - area:browser - area:cicd - area:client - - area:cloud - area:cloudevents - - area:cloudfoundry + - area:cloud - area:code - area:container - area:cpu diff --git a/.github/workflows/scripts/get-registry-areas.sh b/.github/workflows/scripts/get-registry-areas.sh new file mode 100755 index 0000000000..b33c9b3c60 --- /dev/null +++ b/.github/workflows/scripts/get-registry-areas.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 +# +# Get a list of the semantic conventions areas from the registry. + +CUR_DIRECTORY=$(dirname "$0") +REPO_DIR="$( cd "$CUR_DIRECTORY/../../../" && pwd )" +REGISTRY_DIR="$( cd "$REPO_DIR/model/registry" && pwd )" + +# Explicitly sort with `-d` (dictionary) so BSD and GNU work alike. +for entry in $(ls $REGISTRY_DIR | egrep '\.yaml$' | sort -d) +do + echo "$entry" +done