forked from RatScanner/RatScanner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish.bat
35 lines (29 loc) · 938 Bytes
/
publish.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
31
32
33
34
35
@echo off
if "%~1"=="--self-contained" (
echo Publishing as self contained
set selfContained="true"
) else (
echo Publishing framework dependet
set selfContained="false"
)
:: Remove old publish folder
echo Removing old publish folder...
rmdir /s /q publish
:: Publish
echo Publishing RatScanner project...
dotnet publish RatScanner/RatScanner.csproj -c Release -o publish --runtime win-x64 --self-contained %selfContained%
:: Download Updater
echo Adding latest updater build...
curl -L "https://github.com/RatScanner/RatUpdater/releases/latest/download/RatUpdater.exe" --output "publish/RatUpdater.exe"
:: Zip
where 7z
if %ERRORLEVEL% neq 0 (
echo Skipping packing since no 7-Zip installation was found in path
) else (
echo Packing publish folder...
7z a -r RatScanner.zip ./publish/*
)
:: Finalize publish
echo Done
echo Run the published version to make sure there were no errors
pause