3.1 KiB
3.1 KiB
Script Workflows
Practical command recipes for common tasks.
1) Start a Clean Dev Shell
cd E:\stansshit\csharp\journal-master\journal
. .\scripts\dev-shell.ps1
Use this when you want the current shell configured with repo-local cache paths.
2) Build .NET Projects With Safe Defaults
.\scripts\dotnet-min.ps1 build Journal.Sidecar/Journal.Sidecar.csproj
.\scripts\dotnet-min.ps1 build Journal.WebGateway/Journal.WebGateway.csproj
3) Build Frontend or Desktop App
Web build:
.\scripts\publish-app.ps1 -Target web
Tauri raw exe (no installer):
.\scripts\publish-app.ps1 -Target tauri -TauriBundles none
Tauri installer bundles:
.\scripts\publish-app.ps1 -Target tauri -TauriBundles nsis
.\scripts\publish-app.ps1 -Target tauri -TauriBundles msi
4) Publish Sidecar
.\scripts\publish-sidecar.ps1 -Configuration Release -Runtime win-x64
Expected output under output/.
5) Publish WebGateway Package
.\scripts\publish-app.ps1 -Target web
.\scripts\publish-webgateway.ps1 -Configuration Release -Runtime win-x64
If you only want gateway binary refresh:
.\scripts\publish-webgateway.ps1 -SkipWebAssets
6) Run WebGateway Against Explicit Root
When multiple clones exist, always pin project root:
.\scripts\run-webgateway.ps1 -ProjectRoot E:\stansshit\csharp\journal-master\journal -Urls http://0.0.0.0:5180
Quick health check:
Invoke-RestMethod http://127.0.0.1:5180/api/health
Inspect active backend config:
$body = @{ action = 'config.get' } | ConvertTo-Json
Invoke-RestMethod -Uri http://127.0.0.1:5180/api/command -Method Post -ContentType 'application/json' -Body $body
7) Python Package Installs in Repo-Local Target
.\scripts\pip-min.ps1 install requests
Packages go to .pydeps\py314 unless you pass your own --target/--prefix.
8) Migration Gate (When Full Test Assets Exist)
.\scripts\migration-gate.ps1
Partial run:
.\scripts\migration-gate.ps1 -SkipSmoke -SkipApi
If tests/ is absent, Python parity and API contract steps are skipped with a clear message.
9) NuGet Cache Export/Import (Offline-ish Restore)
Export:
.\scripts\nuget-export-cache.ps1 -OutputZip .\nuget-cache-export.zip
Import:
.\scripts\nuget-import-cache.ps1 -InputZip .\nuget-cache-export.zip
Validates restore for Journal.Sidecar, Journal.WebGateway, and Journal.SmokeTests.
10) Quick Troubleshooting
Script blocked by execution policy:
pwsh -NoProfile -ExecutionPolicy Bypass -File .\scripts\publish-app.ps1 -Target web
Unexpected data/vault mismatch in WebGateway:
- Run with explicit
-ProjectRoot. - Verify with
config.getvia/api/command. - Verify sidecar root via
/api/sidecar/root.
NuGet restore flakiness:
- Use
dotnet-min.ps1wrappers. - Confirm proxy vars are cleared (
HTTP_PROXY,HTTPS_PROXY, etc.). - Ensure
.nugetdirectories are writable.