1 Commits

Author SHA1 Message Date
Meiam
b0427939fa 修复: 统一滚动测试版名称 2026-09-17 15:15:44 +08:00
2 changed files with 16 additions and 16 deletions

View File

@@ -54,11 +54,11 @@
## 版本渠道
- **正式版**:版本号末位为 `0`,例如 `1.0.18.0`。正式版会发布到 GitHub Releases,并同步到 Jellyfin 稳定插件仓库。
- **预发布版**:GitHub 只保留一个滚动更新的“预发布版”,固定使用 `preview` 标签和 `Emby_preview.zip`、`Jellyfin_preview.zip` 两个附件。
- 每次更新预发布版时,插件内部版本末位继续递增,例如 `1.0.17.1`、`1.0.17.2`,用于识别用户实际安装的测试批次;旧测试包会被新包替换。
- 预发布版不会写入稳定插件仓库,测试用户需要从 GitHub 的 `preview` Release 手动下载安装。
- 正式版版本号必须高于同一轮全部预发布版。例如 `1.0.17.1`、`1.0.17.2` 验证完成后发布 `1.0.18.0`。
- 正式版发布后,滚动预发布 Release 会转为草稿保留;开始下一轮测试时再更新并重新公开。
- **测试版(Preview)**:GitHub 只保留一个滚动更新的“测试版(滚动更新)”,固定使用 `preview` 标签和 `Emby_preview.zip`、`Jellyfin_preview.zip` 两个附件。GitHub 中仍标记为 Pre-release,以区别于稳定发布。
- 每次更新测试版时,插件内部版本末位继续递增,例如 `1.0.17.1`、`1.0.17.2`,用于识别用户实际安装的测试批次;旧测试包会被新包替换。
- 测试版不会写入稳定插件仓库,测试用户需要从 GitHub 的 `preview` Release 手动下载安装。
- 正式版版本号必须高于同一轮全部测试版。例如 `1.0.17.1`、`1.0.17.2` 验证完成后发布 `1.0.18.0`。
- 正式版发布后,滚动测试 Release 会转为草稿保留;开始下一轮测试时再更新并重新公开。
## 安装

View File

@@ -49,11 +49,11 @@ if ($Channel -eq "Stable" -and $Revision -ne 0) {
}
if ($Channel -eq "Preview" -and $Revision -eq 0) {
throw "预发布版版本号末位必须大于 0,例如 1.0.17.1。"
throw "测试版版本号末位必须大于 0,例如 1.0.17.1。"
}
if ($Channel -eq "Preview" -and $PublishToGitHub -and [string]::IsNullOrWhiteSpace($Notes)) {
throw "发布滚动预发布版时必须通过 -Notes 说明本轮测试重点。"
throw "发布滚动测试版时必须通过 -Notes 说明本轮测试重点。"
}
$CurrentVersionMatch = [regex]::Match((Get-Content -LiteralPath $ThunderCsproj -Raw), '<Version>([\d\.]+)</Version>')
@@ -94,7 +94,7 @@ if ($Channel -eq "Stable") {
}
}
$ChannelLabel = if ($Channel -eq "Preview") { "预发布" } else { "正式发布" }
$ChannelLabel = if ($Channel -eq "Preview") { "测试版发布" } else { "正式发布" }
Write-Host "=== 开始${ChannelLabel}流程,目标版本:$Version ===" -ForegroundColor Cyan
if ($ValidateOnly) {
@@ -247,7 +247,7 @@ if ($PublishToGitHub) {
}
$CommitMessage = if ($Channel -eq "Preview") {
"发布: 更新滚动预发布版至 v$Version"
"发布: 更新滚动测试版至 v$Version"
} else {
"发布: v$Version"
}
@@ -263,7 +263,7 @@ if ($PublishToGitHub) {
}
if ($Channel -eq "Preview") {
Write-Host "Updating rolling GitHub preview release..." -ForegroundColor Yellow
Write-Host "Updating rolling GitHub test release..." -ForegroundColor Yellow
$CommitSha = git @GitArguments rev-parse HEAD
if ($LASTEXITCODE -ne 0) {
throw "无法读取预发布提交哈希。"
@@ -308,15 +308,15 @@ $Notes
if ($PreviewReleaseExists) {
& gh release upload $PreviewTag $EmbyZip $JellyfinZip --clobber
if ($LASTEXITCODE -ne 0) {
throw "覆盖滚动预发布附件失败;请检查仓库是否启用了 Release 不可变保护。"
throw "覆盖滚动测试附件失败;请检查仓库是否启用了 Release 不可变保护。"
}
& gh release edit $PreviewTag --title "预发布版" --notes-file $PreviewNotesFile --prerelease --draft=false --latest=false
& gh release edit $PreviewTag --title "测试版(滚动更新)" --notes-file $PreviewNotesFile --prerelease --draft=false --latest=false
} else {
& gh release create $PreviewTag $EmbyZip $JellyfinZip --title "预发布版" --verify-tag --notes-file $PreviewNotesFile --prerelease --latest=false
& gh release create $PreviewTag $EmbyZip $JellyfinZip --title "测试版(滚动更新)" --verify-tag --notes-file $PreviewNotesFile --prerelease --latest=false
}
if ($LASTEXITCODE -ne 0) {
throw "创建或更新滚动预发布 Release 失败。"
throw "创建或更新滚动测试 Release 失败。"
}
} finally {
if (Test-Path -LiteralPath $PreviewNotesFile) {
@@ -324,7 +324,7 @@ $Notes
}
}
Write-Host "滚动预发布已更新:不要修改 manifest-stable.json。" -ForegroundColor Yellow
Write-Host "滚动测试版已更新:不要修改 manifest-stable.json。" -ForegroundColor Yellow
} else {
Write-Host "Creating stable GitHub Release v$Version and uploading assets..." -ForegroundColor Yellow
$ReleaseArguments = @(
@@ -349,7 +349,7 @@ $Notes
if ($LASTEXITCODE -eq 0) {
& gh release edit $PreviewTag --draft
if ($LASTEXITCODE -ne 0) {
throw "正式版已创建,但隐藏滚动预发布 Release 失败。"
throw "正式版已创建,但隐藏滚动测试 Release 失败。"
}
}