Skip to content

Commit

Permalink
infra: update check-since-version as it blocked #12151
Browse files Browse the repository at this point in the history
  • Loading branch information
romani authored and nrmancuso committed Apr 26, 2023
1 parent a65477c commit a0df847
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .ci/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,18 @@ check-since-version)

if [ -f "$NEW_CHECK_FILE" ]; then
echo "New Check detected: $NEW_CHECK_FILE"
CS_POM_VERSION="$(getCheckstylePomVersion)"
CS_RELEASE_VERSION=$(echo "$CS_POM_VERSION" | cut -d '-' -f 1)
CS_RELEASE_VERSION="$(getCheckstylePomVersionWithoutSnapshot)"
echo "CS Release version: $CS_RELEASE_VERSION"

if [[ $CS_RELEASE_VERSION != *.0 ]]; then
echo "Next release version is bug fix '$CS_RELEASE_VERSION', we will bump second digit in it";
MAJOR=$(echo "$CS_RELEASE_VERSION" | cut -d. -f1)
MINOR=$(echo "$CS_RELEASE_VERSION" | cut -d. -f2)
PATCH=$(echo "$CS_RELEASE_VERSION" | cut -d. -f3)
CS_RELEASE_VERSION="$MAJOR""."$((MINOR+1))".0"
echo "Expected CS Release version after merge of target commit: $CS_RELEASE_VERSION"
fi

echo "Grep for @since $CS_RELEASE_VERSION"
grep "* @since $CS_RELEASE_VERSION" "$NEW_CHECK_FILE"
else
Expand Down

0 comments on commit a0df847

Please sign in to comment.