Skip to content

Commit

Permalink
Merge pull request #21 from upfrontIO/improve-grep
Browse files Browse the repository at this point in the history
fix: improve grep for remove branches
  • Loading branch information
DaRaFF committed Mar 8, 2018
2 parents 702bea7 + 8e4c7c8 commit c8aea8a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/create-release-branch
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ hasPackageJson () {
}

hasMaintenanceBranch () {
if ! [ -z "$(git branch -a | grep -w $RELEASE_BRANCH_NAME)" ]; then
if ! [ -z "$(git branch -a | grep /$RELEASE_BRANCH_NAME$)" ]; then
redLog "ERR: A branch named $RELEASE_BRANCH_NAME already exists locally or remotely."
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion bin/finish-release
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [ "x$localBranchExists" != "x" ]; then
fi

# Stop if there is no remote release branch
remoteBranchExists=$(git branch -r | { grep -w "release-$releaseVersion" || true; })
remoteBranchExists=$(git branch -r | { grep /release-$releaseVersion$ || true; })
if [ "x$remoteBranchExists" = "x" ]; then
yellowLog "ERR: There is no remote branch release-$releaseVersion.
Please execute 'init-release' first"
Expand Down
2 changes: 1 addition & 1 deletion bin/init-release
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fi


# Does the branch to create already exist?
if [ $(git branch -a | grep -w "release-$releaseVersion") ]; then
if [ $(git branch -a | grep /release-$releaseVersion$) ]; then
yellowLog "ERR: Branch release-$releaseVersion already exists."
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion bin/push-feat-commit
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fi


# Does the branch to create already exist?
if [ $(git branch -a | grep -w "bump-$version") ]; then
if [ $(git branch -a | grep /bump-$version$) ]; then
yellowLog "ERR: Branch bump-$version already exists."
exit 1
fi
Expand Down

0 comments on commit c8aea8a

Please sign in to comment.