Skip to content

Commit

Permalink
Updated getversion.cmd to work with NuGet normalized versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jongalloway committed Mar 14, 2017
1 parent b986342 commit 834194c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions getversion.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
SET /P version=<"%~dp0version.txt"

FOR /F "tokens=1-4 delims=." %%V in ("%version%") DO (
SET "dottedVersion=%%V.%%W.%%X.%%Y"
::NuGet now normalizes versions, so need to remove build number if 0
IF %%Y EQU 0 (SET "dottedVersion=%%V.%%W.%%X") ELSE (SET "dottedVersion=%%V.%%W.%%X.%%Y")
SET "rcVersion=%%V,%%W,%%X,%%Y"
)
)

0 comments on commit 834194c

Please sign in to comment.