This commit is contained in:
Ivan Fontosh
2026-05-18 08:35:36 +08:00
parent 4e5d320c36
commit cfa067519d
6 changed files with 167 additions and 18 deletions
+18 -4
View File
@@ -1,13 +1,17 @@
# Copy of D:\TTRPG-Release\release-all.ps1
# Full release: prepare (build Win/Linux, copy) then publish (validate + upload).
# Run: release-all.cmd (default: -AfterMac, version already set, Mac files in release folder)
# release-all-bump.cmd (bump version first, Mac later)
param(
[string]$Version = '',
[switch]$Patch,
[switch]$Bump,
[switch]$AfterMac,
[switch]$Minor,
[switch]$SkipGit,
[switch]$SkipLinux,
[switch]$NoBump,
[switch]$CheckOnlyPublish
[switch]$CheckOnlyPublish,
[switch]$SkipMac
)
Set-StrictMode -Version Latest
@@ -24,9 +28,18 @@ if (-not (Test-Path -LiteralPath $PublishScript)) {
throw "Missing publish.ps1: $PublishScript"
}
$useAfterMac = $AfterMac
if ($Bump -and $AfterMac) {
throw 'Use either -Bump or -AfterMac, not both'
}
if (-not $Bump -and -not $PSBoundParameters.ContainsKey('AfterMac')) {
$useAfterMac = $true
}
$prepareArgs = @()
if ($Version) { $prepareArgs += '-Version', $Version }
if ($Patch) { $prepareArgs += '-Patch' }
if ($Bump) { $prepareArgs += '-Bump' }
if ($useAfterMac) { $prepareArgs += '-AfterMac' }
if ($Minor) { $prepareArgs += '-Minor' }
if ($SkipGit) { $prepareArgs += '-SkipGit' }
if ($SkipLinux) { $prepareArgs += '-SkipLinux' }
@@ -34,6 +47,7 @@ if ($NoBump) { $prepareArgs += '-NoBump' }
$publishArgs = @()
if ($CheckOnlyPublish) { $publishArgs += '-CheckOnly' }
if ($SkipMac) { $publishArgs += '-SkipMac' }
Write-Host '=== TTRPG Full Release ===' -ForegroundColor Cyan
Write-Host ''