-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.cmd
More file actions
43 lines (36 loc) · 900 Bytes
/
build.cmd
File metadata and controls
43 lines (36 loc) · 900 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
32
33
34
35
36
37
38
39
40
41
42
43
@echo off
setlocal
set BUILD=%~dp0build
echo === HamDigiSharp Build ===
echo.
echo [1/3] Cleaning...
if exist "%BUILD%" rmdir /s /q "%BUILD%"
mkdir "%BUILD%\nuget"
mkdir "%BUILD%\demo"
echo [2/3] Packing NuGet...
dotnet pack "%~dp0HamDigiSharp\HamDigiSharp.csproj" ^
-c Release ^
-o "%BUILD%\nuget" ^
--verbosity quiet
if errorlevel 1 goto :fail
echo [3/3] Publishing demo...
dotnet publish "%~dp0HamDigiSharp.Demo\HamDigiSharp.Demo.csproj" ^
-c Release ^
--self-contained false ^
-p:DebugType=None ^
-p:DebugSymbols=false ^
-o "%BUILD%\demo" ^
--verbosity quiet
if errorlevel 1 goto :fail
echo.
echo === Done ===
echo.
echo NuGet : %BUILD%\nuget
for /f %%f in ('dir /b "%BUILD%\nuget\*.nupkg" 2^>nul') do echo %%f
echo Demo : %BUILD%\demo
for /f %%f in ('dir /b "%BUILD%\demo" 2^>nul') do echo %%f
goto :eof
:fail
echo.
echo Build FAILED.
exit /b 1