fix(deploy): force push main branch
This commit is contained in:
@@ -13,8 +13,13 @@ push_to_remote() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
local push_args=()
|
||||
if [ "$branch" = "main" ]; then
|
||||
push_args+=("--force")
|
||||
fi
|
||||
|
||||
echo "=========================================="
|
||||
echo "git push $remote $branch ..."
|
||||
echo "git push ${push_args[*]} $remote $branch ..."
|
||||
echo "=========================================="
|
||||
|
||||
local current=$(git branch --show-current 2>/dev/null || echo "unknown")
|
||||
@@ -29,7 +34,7 @@ push_to_remote() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
git push "$remote" "$branch"
|
||||
git push "${push_args[@]}" "$remote" "$branch"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "=========================================="
|
||||
|
||||
Reference in New Issue
Block a user