Don't exit when getting no match for grep
Don't exit when getting no match for grep Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>pull/4643/head
parent
fad2df8740
commit
f1dea158d0
|
@ -138,8 +138,8 @@ if [[ -n $release_branch_name ]]; then
|
|||
remote_release_branch_name="$remote/$release_branch_name"
|
||||
|
||||
# Determine whether the local and remote release branches already exist
|
||||
local_branch=$(git branch | grep "$release_branch_name")
|
||||
remote_branch=$(git branch -r | grep "$remote_release_branch_name")
|
||||
local_branch=$(git branch | { grep "$release_branch_name" || true; })
|
||||
remote_branch=$(git branch -r | { grep "$remote_release_branch_name" || true;})
|
||||
if [[ -z $remote_branch ]]; then
|
||||
echo "The branch $remote_release_branch_name must be created before you tag the release."
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue