Skip to content

Commit

Permalink
Merge pull request #88 from KIT-MRT/keep_whitespace_when_computing_ve…
Browse files Browse the repository at this point in the history
…rsion

Keep spaces and newline characters when sanitizing the PR description.
  • Loading branch information
ll-nick authored Nov 22, 2024
2 parents f8ffd24 + 1b63fb3 commit 4bb8da6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
PR_BODY: ${{ github.event.pull_request.body }}
run: |
source version
new_version=$(.github/workflows/compute_version.sh "$VERSION" "${PR_BODY//[^a-zA-Z0-9#]/}")
new_version=$(.github/workflows/compute_version.sh "$VERSION" "${PR_BODY//[^a-zA-Z0-9# $'\n']/}")
echo "new_version=$new_version" >> $GITHUB_OUTPUT
update-version-file:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compute_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [[ $# -ne 2 ]]; then
fi

initial_version=${1//[^0-9.]/}
input_string=${2//[^a-zA-Z0-9#]/}
input_string=${2//[^a-zA-Z0-9# $'\n']/}

initial_major=$(echo "$initial_version" | cut -d'.' -f1)
initial_minor=$(echo "$initial_version" | cut -d'.' -f2)
Expand Down

0 comments on commit 4bb8da6

Please sign in to comment.