mirror of
https://github.com/vmware-tanzu/velero.git
synced 2025-12-23 06:15:21 +00:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user