Skip to content

Commit 1e9c998

Browse files
Update version handling in build properties
Modified common.props and CommandLineParser.cs to handle stable versions. The changes in common.props split the versioning into two parts: VersionPrefix and VersionSuffix. If the VersionStable property isn't set, the VersionSuffix is set to "develop" or "ci". In CommandLineParser.cs, build task arguments are modified to write VersionPrefix and VersionSuffix separately. This provides more granular control over product versioning.
1 parent bd89a00 commit 1e9c998

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

build/BenchmarkDotNet.Build/CommandLineParser.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,13 @@ private void PrintHelp()
154154
Write(ScriptName + " ");
155155
WriteTask("pack ");
156156
WriteOption("/p:");
157-
WriteArg("Version");
157+
WriteArg("VersionPrefix");
158158
WriteOption("=");
159-
WriteArg("0.1.1729-preview");
159+
WriteArg("0.1.1729");
160+
WriteOption(" /p:");
161+
WriteArg("VersionSuffix");
162+
WriteOption("=");
163+
WriteArg("preview");
160164
WriteLine();
161165

162166
WritePrefix();

build/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<VersionPrefix>0.13.5</VersionPrefix>
4141
</PropertyGroup>
4242

43-
<PropertyGroup Condition=" '$(VersionSuffix)' == '' ">
43+
<PropertyGroup Condition=" '$(VersionStable)' == '' AND '$(VersionSuffix)' == '' ">
4444
<VersionSuffix>develop</VersionSuffix>
4545
<VersionSuffix Condition=" '$(BDN_CI_BUILD)' != '' ">ci</VersionSuffix>
4646
</PropertyGroup>

0 commit comments

Comments
 (0)