Skip to content

Commit 2242a1e

Browse files
committed
fix: target branch checks
1 parent 456b529 commit 2242a1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hooks/check-branch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ isVersionBranch=$( if [[ ${targetBranch} =~ ^[0-9]+.[0-9]+$ ]]; then echo true;
66

77
# Check that the code version matches the branch version if on a versioned branch
88
# `%.*` strips out the suffix after (and including) the last `.`
9-
if "$isVersionBranch" && [[ "${targetBranch%.*}" != "${newestVersion%.*}" ]]
9+
if "$isVersionBranch" && [[ "${targetBranch}" != "${newestVersion%.*}" ]]
1010
then
11-
echo "Code version (${newestVersion%.*}) does not match branch (${targetBranch%.*}), unexpected."
11+
echo "Code version (${newestVersion%.*}) does not match branch (${targetBranch}), unexpected."
1212
exit 1
1313
fi

0 commit comments

Comments
 (0)