forked from Stability-AI/StableSwarmUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch-windows-dev.ps1
More file actions
22 lines (17 loc) · 827 Bytes
/
launch-windows-dev.ps1
File metadata and controls
22 lines (17 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Ensure correct local path.
$thisPath = Split-Path $MyInvocation.MyCommand.Path -Parent
cd $thisPath
# Visual Studio likes to generate invalid files here for some reason, so autonuke it
if (Test-Path "src/Properties/launchSettings.json") {
rm src/Properties/launchSettings.json
}
# Nuke build files to ensure our build is fresh and won't skip past errors
Remove-Item 'src/bin/' -Recurse
Remove-Item 'src/obj/' -Recurse
# Building first is more reliable than running directly from src
dotnet build src/StableSwarmUI.csproj --configuration Debug -o src/bin/live_release
# Default env configuration, gets overwritten by the C# code's settings handler
$Env:ASPNETCORE_ENVIRONMENT = "Production"
$Env:ASPNETCORE_URLS = "http://*:7801"
# Actual runner.
dotnet src\bin\live_release\StableSwarmUI.dll --environment dev @args