Skip to content

Commit ef08196

Browse files
authored
Fix release PR body wording for drifted CLI version (#53)
1 parent c0cb835 commit ef08196

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

scripts/release.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ git checkout -b "$BRANCH"
123123
echo "Updating VERSION to $VERSION..."
124124
echo "$VERSION" > VERSION
125125

126+
PREV_CLI_VERSION=$(grep -E '^ default: v[0-9]+\.[0-9]+\.[0-9]+$' action.yml | sed -E 's/.*default: v//')
127+
126128
echo "Updating cli_version default in action.yml to v$CLI_VERSION..."
127129
sed -i.bak -E "s/^( default: v)[0-9]+\.[0-9]+\.[0-9]+\$/\1$CLI_VERSION/" action.yml
128130
sed -i.bak -E "s/(Linear Release CLI version to install \(e\.g\., \"v)[0-9]+\.[0-9]+\.[0-9]+(\"\))/\1$CLI_VERSION\2/" action.yml
@@ -142,8 +144,10 @@ git push -u origin "$BRANCH"
142144
echo "Creating pull request..."
143145
if [ "$CLI_VERSION" = "$VERSION" ]; then
144146
PR_BODY="Bumps the action and default CLI version to v$VERSION."
145-
else
147+
elif [ "$CLI_VERSION" = "$PREV_CLI_VERSION" ]; then
146148
PR_BODY="Bumps the action to v$VERSION (default CLI version stays at v$CLI_VERSION)."
149+
else
150+
PR_BODY="Bumps the action to v$VERSION (default CLI version bumped to v$CLI_VERSION)."
147151
fi
148152
PR_URL=$(gh pr create \
149153
--title "Release v$VERSION" \

0 commit comments

Comments
 (0)