feat: create standalone native fnOS repository

This commit is contained in:
2026-10-02 15:19:09 +08:00
parent 69f3c30fab
commit 6725fc131d
492 changed files with 94023 additions and 3 deletions
+8 -3
View File
@@ -4,9 +4,8 @@ param(
)
$ErrorActionPreference = "Stop"
$root = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
$project = Join-Path $PSScriptRoot "havline"
$mainRepo = Join-Path $root "havline"
$mainRepo = Join-Path $PSScriptRoot "app-src"
$version = (Get-Content -Raw (Join-Path $mainRepo "VERSION")).Trim()
function Copy-Tree {
@@ -27,12 +26,18 @@ if (-not (Test-Path -LiteralPath $project)) {
}
if (-not $FnpackPath) {
$localTool = Join-Path $root "fnos\fnpack.exe"
$localTool = Join-Path $PSScriptRoot "fnpack.exe"
$FnpackPath = if (Test-Path -LiteralPath $localTool) { $localTool } else { "fnpack" }
}
Push-Location (Join-Path $mainRepo "web")
try {
if (-not (Test-Path -LiteralPath (Join-Path (Get-Location) "node_modules"))) {
npm ci
if ($LASTEXITCODE -ne 0) {
throw "安装前端依赖失败,退出码:$LASTEXITCODE"
}
}
$env:VITE_BASE_PATH = "/app/havline/"
npm run build
if ($LASTEXITCODE -ne 0) {