-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathBuild.bat
33 lines (24 loc) · 1.06 KB
/
Build.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
SETLOCAL
SET Version=6.0.0
SET Prerelease=auto
@SET Config=%1%
@IF [%1] == [] SET Config=Debug
REM Updating the build version.
PowerShell -ExecutionPolicy ByPass .\tools\Build\ChangeVersion.ps1 %Version% %Prerelease% || GOTO Error0
dotnet build --configuration %Config% -p:RhetosDeploy=false || GOTO Error0
IF NOT EXIST Install MD Install
DEL /F /S /Q Install\* || GOTO Error0
WHERE /Q NuGet.exe || ECHO ERROR: Please download the NuGet.exe command line tool. && GOTO Error0
NuGet pack -OutputDirectory Install || GOTO Error0
REM Updating the build version back to "dev" (internal development build), to avoid spamming git history with timestamped prerelease versions.
PowerShell -ExecutionPolicy ByPass .\tools\Build\ChangeVersion.ps1 %Version% dev || GOTO Error0
@REM ================================================
@ECHO.
@ECHO %~nx0 SUCCESSFULLY COMPLETED.
@EXIT /B 0
:Error0
@PowerShell -ExecutionPolicy ByPass .\tools\Build\ChangeVersion.ps1 %Version% dev >nul
@ECHO.
@ECHO %~nx0 FAILED.
@IF /I [%1] NEQ [/NOPAUSE] @PAUSE
@EXIT /B 1