mirror of
https://github.com/black-ant/Ant-Browser.git
synced 2026-07-14 18:48:55 +08:00
publish: 1.0.0 snapshot (d0230b6)
channel: master version: 1.0.0 source-ref: master published-at-utc: 2026-03-13T15:30:24Z
This commit is contained in:
@@ -16,7 +16,7 @@ tools\public-release\publish-public.bat
|
||||
|
||||
Behavior:
|
||||
|
||||
- public `master` is always published as one aggregated commit
|
||||
- public `master` keeps history and appends one aggregated commit per publish
|
||||
- the script shows console options for publish scope: `master` / `master+release` / `master+tag` / `master+release+tag`
|
||||
- running the script will publish directly; use `-DryRun` only when you explicitly want a no-push preview
|
||||
- command line switches are kept only for automation/manual override
|
||||
|
||||
@@ -5,4 +5,10 @@ set "SCRIPT_DIR=%~dp0"
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_DIR%publish-public.ps1" -AllowDirtyWorkingTree %*
|
||||
set "EXIT_CODE=%ERRORLEVEL%"
|
||||
|
||||
if not "%EXIT_CODE%"=="0" (
|
||||
echo.
|
||||
echo Publish failed with exit code %EXIT_CODE%.
|
||||
pause
|
||||
)
|
||||
|
||||
endlocal & exit /b %EXIT_CODE%
|
||||
|
||||
@@ -721,8 +721,16 @@ try {
|
||||
Invoke-Git -Args @("config", "user.name", $committer.Name) | Out-Null
|
||||
Invoke-Git -Args @("config", "user.email", $committer.Email) | Out-Null
|
||||
|
||||
Write-Step "Publishing snapshot to $TargetBranch (single-commit branch)"
|
||||
Invoke-Git -Args @("checkout", "--orphan", $TargetBranch) | Out-Null
|
||||
if ((Get-TrimmedText $targetRemoteOid) -ne "") {
|
||||
Write-Step "Loading current public $TargetBranch"
|
||||
Invoke-Git -Args @("fetch", "--no-tags", "public", "refs/heads/${TargetBranch}:refs/remotes/public/$TargetBranch") | Out-Null
|
||||
Invoke-Git -Args @("checkout", "-B", $TargetBranch, "refs/remotes/public/$TargetBranch") | Out-Null
|
||||
} else {
|
||||
Write-Step "Creating initial public $TargetBranch"
|
||||
Invoke-Git -Args @("checkout", "--orphan", $TargetBranch) | Out-Null
|
||||
}
|
||||
|
||||
Write-Step "Publishing snapshot to $TargetBranch (one aggregated commit)"
|
||||
Sync-SnapshotToRepo -SnapshotDir $snapshotDir -RepoDir $workRepoDir
|
||||
Invoke-Git -Args @("add", "-A") | Out-Null
|
||||
|
||||
@@ -733,13 +741,9 @@ try {
|
||||
-SourceRefValue $SourceRef `
|
||||
-SourceCommit $sourceCommit `
|
||||
-AppendSourceCommit:$IncludeSourceCommit
|
||||
Invoke-GitCommit -Message $targetMessage
|
||||
Invoke-GitCommit -Message $targetMessage -AllowEmpty
|
||||
|
||||
$publishedCommit = Get-FirstOutputLine -Lines (Invoke-Git -Args @("rev-parse", "HEAD")).Output
|
||||
$targetCount = Get-FirstOutputLine -Lines (Invoke-Git -Args @("rev-list", "--count", $TargetBranch)).Output
|
||||
if ($targetCount -ne "1") {
|
||||
throw "Local target branch $TargetBranch is expected to have exactly 1 commit, got $targetCount."
|
||||
}
|
||||
|
||||
Publish-BranchRef -RemoteName "public" -BranchName $TargetBranch -Commitish $publishedCommit -RemoteExpectedOid $targetRemoteOid -DryRun:$publishDryRun
|
||||
|
||||
@@ -768,7 +772,7 @@ try {
|
||||
|
||||
Write-Step "Publish completed"
|
||||
Write-Host "Published source commit: $sourceCommit"
|
||||
Write-Host "Updated target branch: $TargetBranch (always single commit)"
|
||||
Write-Host "Updated target branch: $TargetBranch (appends one aggregated commit per publish)"
|
||||
if ($shouldPublishRelease) {
|
||||
Write-Host "Updated release branch: $releaseBranch"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user