Merge branch 'master' of https://gitea.innovativedevsolutions.org/J.Schmidt92/journal
This commit is contained in:
commit
278a4e0a82
1
.gitignore
vendored
1
.gitignore
vendored
@ -49,3 +49,4 @@ logs/
|
|||||||
.just/
|
.just/
|
||||||
journalapp.exe
|
journalapp.exe
|
||||||
Journal.App/node_modules.old/@rollup/.rollup-win32-x64-msvc-IjiZshxL/rollup.win32-x64-msvc.node
|
Journal.App/node_modules.old/@rollup/.rollup-win32-x64-msvc-IjiZshxL/rollup.win32-x64-msvc.node
|
||||||
|
journalapp(1).exe
|
||||||
|
|||||||
17
devtool.json
17
devtool.json
@ -262,6 +262,23 @@
|
|||||||
"workingDir": ".",
|
"workingDir": ".",
|
||||||
"dependsOn": []
|
"dependsOn": []
|
||||||
}
|
}
|
||||||
|
,
|
||||||
|
{
|
||||||
|
"id": "stage-output",
|
||||||
|
"label": "Stage Output Bundle",
|
||||||
|
"description": "Publish sidecar + web + webgateway + tauri, then stage journalapp.exe into output/",
|
||||||
|
"group": "Build",
|
||||||
|
"command": "pwsh",
|
||||||
|
"args": [
|
||||||
|
"-NoProfile",
|
||||||
|
"-ExecutionPolicy",
|
||||||
|
"Bypass",
|
||||||
|
"-File",
|
||||||
|
"scripts/publish-output.ps1"
|
||||||
|
],
|
||||||
|
"workingDir": ".",
|
||||||
|
"dependsOn": []
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"env": [
|
"env": [
|
||||||
{
|
{
|
||||||
|
|||||||
103
scripts/publish-output.ps1
Normal file
103
scripts/publish-output.ps1
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
param(
|
||||||
|
[ValidateSet("Release", "Debug")]
|
||||||
|
[string]$Configuration = "Release",
|
||||||
|
[string]$Runtime = "win-x64",
|
||||||
|
[switch]$SkipSidecar,
|
||||||
|
[switch]$SkipWeb,
|
||||||
|
[switch]$SkipWebGateway,
|
||||||
|
[switch]$SkipTauri,
|
||||||
|
[switch]$DryRun
|
||||||
|
)
|
||||||
|
|
||||||
|
$commonScript = Join-Path $PSScriptRoot "script-common.ps1"
|
||||||
|
if (-not (Test-Path $commonScript)) {
|
||||||
|
throw "Missing helper script: $commonScript"
|
||||||
|
}
|
||||||
|
. $commonScript
|
||||||
|
|
||||||
|
$repoRoot = Resolve-JournalRepoRoot -StartPath $PSScriptRoot
|
||||||
|
$appRoot = Resolve-JournalAppRoot -RepoRoot $repoRoot
|
||||||
|
$outputRoot = Join-Path $repoRoot "output"
|
||||||
|
|
||||||
|
$publishSidecar = Join-Path $PSScriptRoot "publish-sidecar.ps1"
|
||||||
|
$publishApp = Join-Path $PSScriptRoot "publish-app.ps1"
|
||||||
|
$publishGateway = Join-Path $PSScriptRoot "publish-webgateway.ps1"
|
||||||
|
|
||||||
|
Write-Host "Publishing all outputs to: $outputRoot" -ForegroundColor Cyan
|
||||||
|
Write-Host "Configuration: $Configuration Runtime: $Runtime" -ForegroundColor DarkGray
|
||||||
|
|
||||||
|
if (-not (Test-Path $outputRoot)) {
|
||||||
|
New-Item -ItemType Directory -Force -Path $outputRoot | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
function Invoke-Step {
|
||||||
|
param(
|
||||||
|
[string]$Label,
|
||||||
|
[string]$ScriptPath,
|
||||||
|
[string[]]$Args
|
||||||
|
)
|
||||||
|
|
||||||
|
Write-Host "`n> $Label" -ForegroundColor Cyan
|
||||||
|
Write-Host " $ScriptPath $($Args -join ' ')" -ForegroundColor DarkGray
|
||||||
|
if (-not $DryRun) {
|
||||||
|
& $ScriptPath @Args
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $SkipSidecar) {
|
||||||
|
Invoke-Step "Publish Sidecar" $publishSidecar @(
|
||||||
|
"-Configuration", $Configuration,
|
||||||
|
"-Runtime", $Runtime
|
||||||
|
)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Skipping sidecar publish." -ForegroundColor DarkGray
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $SkipWeb) {
|
||||||
|
Invoke-Step "Build Web UI" $publishApp @(
|
||||||
|
"-Target", "web",
|
||||||
|
"-Configuration", $Configuration
|
||||||
|
)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Skipping web build." -ForegroundColor DarkGray
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $SkipWebGateway) {
|
||||||
|
Invoke-Step "Publish WebGateway" $publishGateway @(
|
||||||
|
"-Configuration", $Configuration,
|
||||||
|
"-Runtime", $Runtime
|
||||||
|
)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Skipping WebGateway publish." -ForegroundColor DarkGray
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $SkipTauri) {
|
||||||
|
Invoke-Step "Build Tauri Desktop App" $publishApp @(
|
||||||
|
"-Target", "tauri",
|
||||||
|
"-Configuration", $Configuration,
|
||||||
|
"-TauriBundles", "none"
|
||||||
|
)
|
||||||
|
|
||||||
|
$targetConfigDir = if ($Configuration -eq "Debug") { "debug" } else { "release" }
|
||||||
|
$tauriExePath = Join-Path $appRoot "src-tauri\\target\\$targetConfigDir\\journalapp.exe"
|
||||||
|
$stagedExePath = Join-Path $outputRoot "journalapp.exe"
|
||||||
|
|
||||||
|
if (Test-Path $tauriExePath) {
|
||||||
|
if ($DryRun) {
|
||||||
|
Write-Host "Would copy: $tauriExePath -> $stagedExePath" -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Copy-Item -Force $tauriExePath $stagedExePath
|
||||||
|
Write-Host "Staged desktop exe: $stagedExePath" -ForegroundColor Green
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Warning "Tauri exe not found at $tauriExePath"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "Skipping Tauri build." -ForegroundColor DarkGray
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user