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

Commit 80454a6

Browse files
committed
Don't want the version to have a fourth zero
1 parent 8efe42a commit 80454a6

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

default.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ properties {
1919
$nugetOutputDir = ".\ReleasePackages"
2020
$nugetExe = "$rootLocation\tools\nuget\nuget.exe"
2121
$versionFile = ".\MajorMinorVersion.txt"
22+
$completeVersionNumber = ""
2223
}
2324

2425
task Default -depends Pack
@@ -37,7 +38,15 @@ task Test -depends Compile {
3738

3839
task Pack -depends Test {
3940
mkdir -p "$nugetOutputDir" -force
40-
invoke-expression "& '$nugetExe' pack '$csprojFile' -Symbols -Properties Configuration=$configuration -OutputDirectory '$nugetOutputDir'"
41+
42+
$versionSwitch = ""
43+
44+
if(!$completeVersionNumber.EndsWith(".*")
45+
{
46+
$versionSwitch = "-Version $completeVersionNumber"
47+
}
48+
49+
invoke-expression "& '$nugetExe' pack '$csprojFile' -Symbols -Properties Configuration=$configuration -OutputDirectory '$nugetOutputDir' $versionSwitch"
4150
}
4251

4352
task SetVersion {

0 commit comments

Comments
 (0)