chore: auto release commit (2026-03-24 18:07:44)
All checks were successful
技能自动化发布 (测试版-无鉴权) / build-and-deploy (push) Successful in 9s
All checks were successful
技能自动化发布 (测试版-无鉴权) / build-and-deploy (push) Successful in 9s
This commit is contained in:
@@ -117,6 +117,7 @@ function Ensure-CleanOrAutoCommit {
|
||||
param(
|
||||
[switch]$DoAutoCommit,
|
||||
[switch]$NeedClean,
|
||||
[switch]$IsDryRun,
|
||||
[string]$Msg
|
||||
)
|
||||
|
||||
@@ -139,6 +140,12 @@ function Ensure-CleanOrAutoCommit {
|
||||
Write-Host "Detected uncommitted changes, auto-committing before release..." -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
if ($IsDryRun) {
|
||||
Write-Host "[DryRun] Would run: git add -A" -ForegroundColor Yellow
|
||||
Write-Host "[DryRun] Would run: git commit -m `"$commitMsg`"" -ForegroundColor Yellow
|
||||
return
|
||||
}
|
||||
|
||||
Invoke-Git "add -A"
|
||||
Invoke-Git "commit -m `"$commitMsg`""
|
||||
}
|
||||
@@ -162,7 +169,7 @@ try {
|
||||
|
||||
Invoke-Git "fetch --tags --prune origin"
|
||||
|
||||
Ensure-CleanOrAutoCommit -DoAutoCommit:$AutoCommit -NeedClean:$RequireClean -Msg $CommitMessage
|
||||
Ensure-CleanOrAutoCommit -DoAutoCommit:$AutoCommit -NeedClean:$RequireClean -IsDryRun:$DryRun -Msg $CommitMessage
|
||||
|
||||
$upstream = (& git rev-parse --abbrev-ref --symbolic-full-name "@{u}" 2>$null)
|
||||
$hasUpstream = ($LASTEXITCODE -eq 0)
|
||||
|
||||
Reference in New Issue
Block a user