Merge pull request #4643 from ywk253100/220215_release_script

Don't exit when getting no match for grep
This commit is contained in:
Xun Jiang/Bruce Jiang
2022-02-24 14:29:42 +08:00
committed by GitHub
+2 -2
View File
@@ -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