From 9ffd997c3bed893e1d2c6cc4a4f5561acc5954fc Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 11 May 2024 14:58:23 +0800 Subject: [PATCH] ci(release): skip git status check in prep phase --- tools/release | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/release b/tools/release index 351321a..c2ea59e 100755 --- a/tools/release +++ b/tools/release @@ -56,11 +56,13 @@ _check_cli() { } _check_git() { - # ensure that changes have been committed - if [[ -n $(git status . -s) ]]; then - echo "> Abort: Commit the staged files first, and then run this tool again." - exit 1 - fi + $opt_pre || ( + # ensure that changes have been committed + if [[ -n $(git status . -s) ]]; then + echo "> Abort: Commit the staged files first, and then run this tool again." + exit 1 + fi + ) $opt_pkg || ( if [[ "$(git branch --show-current)" != "$RELEASE_BRANCH" ]]; then