ci: version from the tag or the commits since it; dev images from main gated on tests; recognise -dev. tags [CI SKIP]

This commit is contained in:
justme committed 2026-10-09 13:20:30 +08:00
1 parent a3338e1cf3
commit a9f78f99df
13 files changed
+124 -51

No files matched your search

+4 -4
View File
@@ -10,10 +10,10 @@ if (-not $env:GITEA_TOKEN) {
$version = $Matches[1]
$root = Split-Path -Parent $PSScriptRoot
$backend = Join-Path $root 'backend'
$projectVersion = [regex]::Match((Get-Content (Join-Path $backend 'Directory.Build.props') -Raw), '<Version>([^<]+)</Version>').Groups[1].Value
if ($version -ne $projectVersion) {
throw "Tag version $version does not match project version $projectVersion."
}
# 版本取自 tag:写进工作区的 Directory.Build.props(仓库里的 <Version> 只是占位,发版不用再提交 bump)
$propsPath = Join-Path $backend 'Directory.Build.props'
$props = Get-Content $propsPath -Raw
Set-Content -LiteralPath $propsPath -Value ([regex]::Replace($props, '<Version>[^<]*</Version>', "<Version>$version</Version>")) -NoNewline
$tarProject = Join-Path $PSScriptRoot 'MoShiro.Tar\MoShiro.Tar.csproj'
$tarTool = Join-Path $PSScriptRoot 'MoShiro.Tar\bin\Release\net10.0\MoShiro.Tar.dll'