-
-
Notifications
You must be signed in to change notification settings - Fork 119
/
update-windows.bat
30 lines (21 loc) · 987 Bytes
/
update-windows.bat
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
@echo off
rem Ensure correct local path.
cd /D "%~dp0"
rem Microsoft borked the dotnet installer/path handler, so force x64 to be read first
set PATH=C:\Program Files\dotnet;%PATH%
set DOTNET_CLI_TELEMETRY_OPTOUT=1
rem For some reason Microsoft's nonsense is missing the official nuget source? So forcibly add that to be safe.
dotnet nuget add source https://api.nuget.org/v3/index.json --name "NuGet official package source"
echo ==Please ignore the above error about source already specified, actual update stuff follows below==
rem The actual update
git pull
rem Make a backup of the current live_release to be safe
if exist src\bin\live_release\ (
rmdir /s /q src\bin\live_release_backup
move src\bin\live_release src\bin\live_release_backup
)
rem Now build the new copy
dotnet build src/SwarmUI.csproj --configuration Release -o src/bin/live_release
for /f "delims=" %%i in ('git rev-parse HEAD') do set CUR_HEAD2=%%i
echo !CUR_HEAD2!> src/bin/last_build
timeout 3