diff --git a/.changeset/pretty-kangaroos-tell.md b/.changeset/pretty-kangaroos-tell.md new file mode 100644 index 00000000000..946869b1ca0 --- /dev/null +++ b/.changeset/pretty-kangaroos-tell.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Add check for valid semvar value for changeset file #internal diff --git a/.github/scripts/check-changeset-tags.sh b/.github/scripts/check-changeset-tags.sh index 579661fe704..f82c16d5769 100755 --- a/.github/scripts/check-changeset-tags.sh +++ b/.github/scripts/check-changeset-tags.sh @@ -29,6 +29,14 @@ if [[ ! -f "$CHANGESET_FILE_PATH" ]]; then exit 1 fi +changeset_content=$(sed -n '/^---$/,/^---$/{ /^---$/!p; }' $CHANGESET_FILE_PATH) +semvar_value=$(echo "$changeset_content" | awk -F": " '/"chainlink"/ {print $2}') + +if [[ "$semvar_value" != "major" && "$semvar_value" != "minor" && "$semvar_value" != "patch" ]]; then + echo "Invalid changeset semvar value for 'chainlink'. Must be 'major', 'minor', or 'patch'." + exit 1 +fi + while IFS= read -r line; do for tag in "${tags_list[@]}"; do if [[ "$line" == *"$tag"* ]]; then