Skip to content

Commit

Permalink
shellcheck all the things
Browse files Browse the repository at this point in the history
  • Loading branch information
jm96441n committed Sep 17, 2024
1 parent 1e97297 commit b7053f5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions build-support/scripts/gen-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ curdir=$(pwd)
filename=".changelog/$pr_number.txt"
if [[ ! $curdir == *"enterprise"* ]]; then
is_enterprise="n"
read -p "Is this an enterprise PR? (y/n): " is_enterprise
read -rp "Is this an enterprise PR? (y/n): " is_enterprise

if [[ $is_enterprise == "y" ]]; then
filename = ".changelog/_$pr_number.txt"
filename=".changelog/_$pr_number.txt"
fi
else
filename = ".changelog/_$pr_number.txt"
filename=".changelog/_$pr_number.txt"
fi

# create a new changelog file
touch $filename
touch "$filename"

echo "Created a new changelog file for PR $pr_number."

Expand All @@ -40,7 +40,7 @@ echo "4. deprecation"
echo "5. bug"

if [ -z "$1" ]; then
read -p "Enter your choice: " choice
read -rp "Enter your choice: " choice
else
choice=$1
fi
Expand Down Expand Up @@ -71,8 +71,10 @@ esac

msg=""

read -ep $'Please enter the changelog message:\n' msg
read -erp $'Please enter the changelog message:\n' msg

echo -e "\`\`\`release-note:$type\n$msg\n\`\`\`" >>"$filename"

cat .changelog/$pr_number.txt
echo -e "\nChangelog added to $filename. Contents:\n"

cat ".changelog/$pr_number.txt"

0 comments on commit b7053f5

Please sign in to comment.