-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.cmd
More file actions
28 lines (26 loc) · 759 Bytes
/
release.cmd
File metadata and controls
28 lines (26 loc) · 759 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
@echo off
cls
set SERVER_OUTPUT=server_out
set OUTPUT_EXEC_NAME=PPGModCompiler
set RESULT_EXEC_NAME=run\PPGMC_Server.exe
cd %~dp0
echo Restoring packages...
dotnet restore PPGModCompiler.csproj -r win-x64 >nul
echo Building...
if not exist %SERVER_OUTPUT% mkdir %SERVER_OUTPUT%
dotnet publish PPGModCompiler.csproj --configuration "Release" --output "%SERVER_OUTPUT%" -r win-x64 >nul
echo Copying files...
copy /Y "%SERVER_OUTPUT%\%OUTPUT_EXEC_NAME%.exe" "%RESULT_EXEC_NAME%"
echo Cleaning up...
rmdir /S /Q "%SERVER_OUTPUT%"
rmdir /S /Q bin
rmdir /S /Q obj
echo Done!
if "%~1"=="run" (
echo Running...
cls
"%RESULT_EXEC_NAME%"
) else (
echo.
echo Did you know you can run 'release.cmd run' to run the executable upon build completion?
)