# ══════════════════════════════════════════════════════════════════ # run-STPViewer.ps1 範本 # # 第一次 clone 下來: # cd secret # Copy-Item run-STPViewer.ps1.example run-STPViewer.ps1 # .\run-STPViewer.ps1 # # 若 PowerShell 擋執行 script,執行一次: # Set-ExecutionPolicy -Scope CurrentUser RemoteSigned # # secret/ 下除 README.md 和 .example 外皆已 gitignore。 # ══════════════════════════════════════════════════════════════════ $ErrorActionPreference = 'Stop' # ─── secret(本專案目前無 DB / ApiKey;未來需要時在此加 env var) ── # $env:SomeService__ApiKey = '__CHANGE_ME__' # ══════════════════════════════════════════════════════════════════ $ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path $RepoRoot = Resolve-Path (Join-Path $ScriptDir '..') Push-Location $RepoRoot try { dotnet run --project src/STPViewer } finally { Pop-Location }