mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-02 22:27:06 +00:00
Merge pull request #4643 from ywk253100/220215_release_script
Don't exit when getting no match for grep
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