Skip to content
This repository was archived by the owner on Nov 20, 2020. It is now read-only.

Commit 31dc39d

Browse files
committed
Pad build numbers and prefix PRs
This will create stuff like: `MyLib.0.1.0-CI0000798.nupkg` (from master) `MyLib.0.1.0-pr17-0000798.nupkg` (from PRs)
1 parent 5fcf2f5 commit 31dc39d

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

build.cmd

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
dotnet pack src/CallPolly --configuration Release -o "%CD%\bin" --version-suffix CI%1
1+
SETLOCAL
2+
SET X=%1
3+
SET BLD=000000%X%
4+
SET BLD=%BLD:~-7%
5+
if [%2]==[] (SET V=CI%BLD%) else (SET V=pr%2-%BLD%)
6+
7+
dotnet pack src/CallPolly --configuration Release -o "%CD%\bin" --version-suffix %V%
28
if ERRORLEVEL 1 (echo Error building CallPolly; exit /b 1)
39

410
dotnet test tests/CallPolly.Tests --configuration Release
511
if ERRORLEVEL 1 (echo Error testing CallPolly; exit /b 1)
612

713
dotnet test tests/CallPolly.Acceptance --configuration Release
8-
if ERRORLEVEL 1 (echo Error acceptance testing CallPolly; exit /b 1)
14+
if ERRORLEVEL 1 (echo Error acceptance testing CallPolly; exit /b 1)
15+
16+
ENDLOCAL

0 commit comments

Comments
 (0)