Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
fix - Building strings now builds build metadata part correctly
Browse files Browse the repository at this point in the history
rrectlyString builder for SemVer classes now builds a SemVer 2.0 compliant string correctly.

---

The string builder used to incorrectly append the "-" #stead of the "+" sign for the build metadata string for provided versions. Now, it uses the latter sign for build metadata. Thus, builds a compliant version string.

---

Type: fix
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Jul 5, 2023
1 parent 475daaf commit 1917cea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SemanVer/Instance/SemVer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public override string ToString()
{
return $"{MajorVersion}.{MinorVersion}.{PatchVersion}" +
(!string.IsNullOrWhiteSpace(PreReleaseInfo) ? $"-{PreReleaseInfo}" : "") +
(!string.IsNullOrWhiteSpace(BuildMetadata) ? $"-{BuildMetadata}" : "");
(!string.IsNullOrWhiteSpace(BuildMetadata) ? $"+{BuildMetadata}" : "");
}

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions SemanVer/SemanVer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyTitle>SemanVer</AssemblyTitle>
<AssemblyDescription>Semantic Version 2.0 parser for .NET</AssemblyDescription>
<Description>Semantic Version 2.0 parser for .NET</Description>
<Version>1.0.0</Version>
<Version>1.0.0.1</Version>
<Authors>Aptivi</Authors>
<DebugType>portable</DebugType>
<AssemblyName>SemanVer</AssemblyName>
Expand All @@ -22,8 +22,8 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageIcon>OfficialAppIcon-SemanVer-512.png</PackageIcon>
<AssemblyVersion>1.0.0</AssemblyVersion>
<PackageVersion>1.0.0</PackageVersion>
<AssemblyVersion>1.0.0.1</AssemblyVersion>
<PackageVersion>1.0.0.1</PackageVersion>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down

0 comments on commit 1917cea

Please # to comment.