From 1e97297215f985e153dd4e92c4444acebbfce0db Mon Sep 17 00:00:00 2001 From: jm96441n Date: Tue, 17 Sep 2024 15:33:14 -0400 Subject: [PATCH] fix spacing of bash scripts --- build-support/scripts/gen-changelog.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build-support/scripts/gen-changelog.sh b/build-support/scripts/gen-changelog.sh index 0e2835e95e..640cc0b16b 100755 --- a/build-support/scripts/gen-changelog.sh +++ b/build-support/scripts/gen-changelog.sh @@ -6,12 +6,17 @@ set -eo pipefail pr_number=$(gh pr list -H "$(git rev-parse --abbrev-ref HEAD)" -q ".[0].number" --json "number") +if [ -z "$pr_number" ]; then + echo "Error: Could not find PR number." + exit 1 +fi + # check if this changelog is referencing an enterprise change curdir=$(pwd) -filename = ".changelog/$pr_number.txt" +filename=".changelog/$pr_number.txt" if [[ ! $curdir == *"enterprise"* ]]; then - is_enterprise = "n" + is_enterprise="n" read -p "Is this an enterprise PR? (y/n): " is_enterprise if [[ $is_enterprise == "y" ]]; then