-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.cmd
52 lines (37 loc) · 1.12 KB
/
build.cmd
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
44
45
46
47
48
49
50
51
@ECHO OFF
SETLOCAL
CALL %CTKBLDROOT%setupEnv.cmd
SET BASENAME=Cyotek.HistoricalDate
SET RELDIR=src\bin\Release\
SET PRJFILE=src\%BASENAME%.csproj
SET DLLNAME=%BASENAME%.dll
IF EXIST %RELDIR%*.nupkg DEL /F %RELDIR%*.nupkg
IF EXIST %RELDIR%*.snupkg DEL /F %RELDIR%*.snupkg
IF EXIST %RELDIR%*.zip DEL /F %RELDIR%*.zip
CALL update-ProjectVersionInfo %PRJFILE%
dotnet build %PRJFILE% --configuration Release
IF %ERRORLEVEL% NEQ 0 GOTO :failed
PUSHD %RELDIR%
CALL signcmd net35\%DLLNAME%
CALL signcmd net40\%DLLNAME%
CALL signcmd net452\%DLLNAME%
CALL signcmd net46\%DLLNAME%
CALL signcmd net462\%DLLNAME%
CALL signcmd net472\%DLLNAME%
CALL signcmd net48\%DLLNAME%
CALL signcmd net5.0\%DLLNAME%
CALL signcmd netcoreapp2.1\%DLLNAME%
CALL signcmd netcoreapp3.1\%DLLNAME%
CALL signcmd netstandard2.0\%DLLNAME%
CALL signcmd netstandard2.1\%DLLNAME%
%zipexe% a %BASENAME%.1.0.%BUILD_NUMBER%.zip -r
POPD
dotnet pack %PRJFILE% --configuration Release --no-build
IF %ERRORLEVEL% NEQ 0 GOTO :failed
CALL sign-package %RELDIR%*.nupkg
CALL sign-package %RELDIR%*.snupkg
ENDLOCAL
GOTO :eof
:failed
CECHO {0c}ERROR : Build failed{#}{\n}
EXIT /b 1