diff --git a/Build/OpenDDSharp.Build/Tasks/PackNuGet.cs b/Build/OpenDDSharp.Build/Tasks/PackNuGet.cs index 740ad819..4658fea3 100644 --- a/Build/OpenDDSharp.Build/Tasks/PackNuGet.cs +++ b/Build/OpenDDSharp.Build/Tasks/PackNuGet.cs @@ -38,7 +38,11 @@ public class PackNuGet : FrostingTask /// public override void Run(BuildContext context) { - var version = $"{context.MajorVersion}.{context.MinorVersion}.{context.PatchVersion}.{context.BuildNumber}{context.PreReleaseTag}"; + var version = $"{context.MajorVersion}.{context.MinorVersion}.{context.PatchVersion}"; + if (!string.IsNullOrWhiteSpace(context.PreReleaseTag)) + { + version += $"-{context.PreReleaseTag}{context.BuildNumber}"; + } var solutionPath = Path.GetFullPath(BuildContext.OPENDDSHARP_SOLUTION_FOLDER); var path = Path.Combine(solutionPath, "Sources", "OpenDDSharp", "OpenDDSharp.csproj"); diff --git a/Build/OpenDDSharp.Build/Tasks/SetVersionNuspec.cs b/Build/OpenDDSharp.Build/Tasks/SetVersionNuspec.cs index b82e1458..eadf11f8 100644 --- a/Build/OpenDDSharp.Build/Tasks/SetVersionNuspec.cs +++ b/Build/OpenDDSharp.Build/Tasks/SetVersionNuspec.cs @@ -36,7 +36,11 @@ public override void Run(BuildContext context) { context.Log.Information("Set version in NuSpec..."); - var version = $"{context.MajorVersion}.{context.MinorVersion}.{context.PatchVersion}.{context.BuildNumber}{context.PreReleaseTag}"; + var version = $"{context.MajorVersion}.{context.MinorVersion}.{context.PatchVersion}"; + if (!string.IsNullOrWhiteSpace(context.PreReleaseTag)) + { + version += $"-{context.PreReleaseTag}{context.BuildNumber}"; + } var path = context.MakeAbsolute(context.Directory(BuildContext.OPENDDSHARP_SOLUTION_FOLDER)); diff --git a/Build/OpenDDSharp.Build/Tasks/SetVersionProjectTemplate.cs b/Build/OpenDDSharp.Build/Tasks/SetVersionProjectTemplate.cs index 44ff4d27..e11877af 100644 --- a/Build/OpenDDSharp.Build/Tasks/SetVersionProjectTemplate.cs +++ b/Build/OpenDDSharp.Build/Tasks/SetVersionProjectTemplate.cs @@ -35,7 +35,11 @@ public override void Run(BuildContext context) { context.Log.Information("Set version in ProjectTemplate..."); - var version = $"{context.MajorVersion}.{context.MinorVersion}.{context.PatchVersion}.{context.BuildNumber}{context.PreReleaseTag}"; + var version = $"{context.MajorVersion}.{context.MinorVersion}.{context.PatchVersion}"; + if (!string.IsNullOrWhiteSpace(context.PreReleaseTag)) + { + version += $"-{context.PreReleaseTag}{context.BuildNumber}"; + } var path = context.MakeAbsolute(context.Directory(BuildContext.OPENDDSHARP_SOLUTION_FOLDER)); diff --git a/GitVersion.yml b/GitVersion.yml index e159eda0..dfe0b344 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,4 +1,4 @@ -next-version: "3.250.1" +next-version: "3.250.2" mode: ContinuousDeployment update-build-number: true tag-prefix: '(release-)?[vV]'