From fc5a4cb8a483c9875fa12696f1df561680fb8cf8 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Tue, 20 May 2025 22:10:45 +0800 Subject: [PATCH] chore: check git status. --- build/build.cake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/build/build.cake b/build/build.cake index ab6e28ee..d4150462 100644 --- a/build/build.cake +++ b/build/build.cake @@ -124,6 +124,21 @@ Task("commit files") .Does(() => { GitAddAll(gitRootPath); + + var exitCode = StartProcess( + "git", + new ProcessSettings { + Arguments = "diff --cached --quiet", + WorkingDirectory = gitRootPath + } + ); + + if(exitCode == 0) + { + Information("no change."); + return; + } + GitCommit(gitRootPath, username, email, $"chore: [AUTO] bump up version to {nugetVersion}."); });