-
-
Notifications
You must be signed in to change notification settings - Fork 389
Expand file tree
/
Copy pathlaunch-linux-dev.sh
More file actions
executable file
·31 lines (24 loc) · 861 Bytes
/
launch-linux-dev.sh
File metadata and controls
executable file
·31 lines (24 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
# Ensure correct local path.
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR"
source ./launchtools/linux-path-fix.sh
# Cycle build folder forward
rm -rf ./src/bin/live_release_backup
mv ./src/bin/live_release ./src/bin/live_release_backup
rm ./src/bin/must_rebuild
rm ./src/bin/last_build
# Build the program
dotnet build src/SwarmUI.csproj --configuration Debug -o ./src/bin/live_release
# Default env configuration, gets overwritten by the C# code's settings handler
export ASPNETCORE_ENVIRONMENT="Production"
export ASPNETCORE_URLS="http://*:7801"
# Actual runner.
./src/bin/live_release/SwarmUI "$@"
# Exit code 42 means restart, anything else = don't.
exitcode=$?
if [ $exitcode == 42 ]; then
exec ./launch-linux-dev.sh "$@"
elif [ $exitcode != 0 ]; then
exit $exitcode
fi