chore: sync fnOS package with Havline 2.0.0

This commit is contained in:
2026-10-24 16:57:35 +08:00
parent e749c2afaf
commit ad7c033342
3 changed files with 17 additions and 6 deletions
+12 -1
View File
@@ -1,4 +1,4 @@
param(
param(
[string]$FnpackPath = "",
[switch]$SkipImageExport
)
@@ -85,6 +85,17 @@ if (-not (Test-Path -LiteralPath $project)) {
throw "找不到飞牛应用工程:$project"
}
# 版本一致性校验:Docker 版离线镜像标签为 havline:<主仓 VERSION>,
# 而容器运行时按 ${TRIM_APPVER}=manifest.version 加载镜像,两者必须严格一致。
$manifestVersion = ([regex]::Match((Get-Content -Raw (Join-Path $project "manifest")), '(?m)^version\s*=\s*(\S+)')).Groups[1].Value
if (-not $manifestVersion) {
throw "Docker manifest 缺少 version 字段:$(Join-Path $project 'manifest')"
}
Write-Output "App version: $version; Manifest version: $manifestVersion"
if ($manifestVersion -ne $version) {
throw "版本不一致:主仓 VERSION=$version,Docker manifest=$manifestVersion。镜像标签与运行时加载版本不匹配,请先将 fnos\havline\manifest 的 version 同步为主仓 VERSION。"
}
if (-not $FnpackPath) {
$localTool = Join-Path $PSScriptRoot "fnpack.exe"
$FnpackPath = if (Test-Path -LiteralPath $localTool) { $localTool } else { "fnpack" }