diff --git a/PackageStagingArea.sln b/PackageStagingArea.sln
index 2cb9c71..49761e2 100644
--- a/PackageStagingArea.sln
+++ b/PackageStagingArea.sln
@@ -9,6 +9,8 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "StagingAreaTests", "Staging
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "IndexTests", "tests\IndexTests\IndexTests.fsproj", "{FA7524A5-3A92-4E33-8E28-726BA2E615D2}"
EndProject
+Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "AVPRCI", "src\AVPRCI\AVPRCI.fsproj", "{C1929D1B-10BD-4826-B2C5-413369B5FE2E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -27,6 +29,10 @@ Global
{FA7524A5-3A92-4E33-8E28-726BA2E615D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA7524A5-3A92-4E33-8E28-726BA2E615D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA7524A5-3A92-4E33-8E28-726BA2E615D2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C1929D1B-10BD-4826-B2C5-413369B5FE2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C1929D1B-10BD-4826-B2C5-413369B5FE2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C1929D1B-10BD-4826-B2C5-413369B5FE2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C1929D1B-10BD-4826-B2C5-413369B5FE2E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/AVPRIndex/AVPRIndex.fsproj b/src/AVPRIndex/AVPRIndex.fsproj
index 1b61b5b..b0eb3bc 100644
--- a/src/AVPRIndex/AVPRIndex.fsproj
+++ b/src/AVPRIndex/AVPRIndex.fsproj
@@ -16,7 +16,7 @@
git
$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/RELEASE_NOTES.md"))
README.md
- 0.2.0
+ 0.2.1
diff --git a/src/AVPRIndex/Domain.fs b/src/AVPRIndex/Domain.fs
index 8577af8..c2a6505 100644
--- a/src/AVPRIndex/Domain.fs
+++ b/src/AVPRIndex/Domain.fs
@@ -333,6 +333,8 @@ module Domain =
&& first.Metadata.MajorVersion = second.Metadata.MajorVersion
&& first.Metadata.MinorVersion = second.Metadata.MinorVersion
&& first.Metadata.PatchVersion = second.Metadata.PatchVersion
+ && first.Metadata.PreReleaseVersionSuffix = second.Metadata.PreReleaseVersionSuffix
+ && first.Metadata.BuildMetadataVersionSuffix = second.Metadata.BuildMetadataVersionSuffix
/// returns true when the two packages have the same content hash
static member contentEquals (first: ValidationPackageIndex) (second: ValidationPackageIndex) =
diff --git a/src/AVPRIndex/RELEASE_NOTES.md b/src/AVPRIndex/RELEASE_NOTES.md
index fe05f15..0ff6c55 100644
--- a/src/AVPRIndex/RELEASE_NOTES.md
+++ b/src/AVPRIndex/RELEASE_NOTES.md
@@ -1,3 +1,7 @@
+## v0.2.1
+
+Fix `ValidationPackageIndex.IdentityEquals` not respecting semver suffixes
+
## v0.2.0
- Add `SemVer` type model for a full semantic version representation including PreRelease and Build metadata with parsing and formatting functions
diff --git a/tests/IndexTests/ValidationPackageIndexTests.fs b/tests/IndexTests/ValidationPackageIndexTests.fs
index 759f204..975e23b 100644
--- a/tests/IndexTests/ValidationPackageIndexTests.fs
+++ b/tests/IndexTests/ValidationPackageIndexTests.fs
@@ -130,6 +130,92 @@ It does it very fast, it does it very swell.
let actual = ValidationPackageIndex.CommentFrontmatter.validFullFrontmatter |> ValidationPackageIndex.getSemanticVersionString
Assert.Equal(SemVer.Strings.fixtureFile, actual)
+ []
+ let ``identityEquals returns true for identical versions``() =
+ Assert.True(
+ ValidationPackageIndex.identityEquals
+ ValidationPackageIndex.CommentFrontmatter.validMandatoryFrontmatter
+ ValidationPackageIndex.CommentFrontmatter.validMandatoryFrontmatter
+ )
+
+ []
+ let ``identityEquals returns false for non-identical versions``() =
+ Assert.False(
+ ValidationPackageIndex.identityEquals
+ ValidationPackageIndex.CommentFrontmatter.validMandatoryFrontmatter
+ ValidationPackageIndex.CommentFrontmatter.validFullFrontmatter
+ )
+
+ []
+ let ``identityEquals returns false for same version with suffixes``() =
+ let a = ValidationPackageIndex.create(
+ repoPath = "",
+ fileName = "",
+ lastUpdated = testDate,
+ contentHash = "",
+ metadata = ValidationPackageMetadata.create(
+ name = "",
+ majorVersion = 1,
+ minorVersion = 0,
+ patchVersion = 0,
+ summary = "",
+ description = "",
+ PreReleaseVersionSuffix = "some",
+ BuildMetadataVersionSuffix = "suffix"
+ )
+ )
+ let b = ValidationPackageIndex.create(
+ repoPath = "",
+ fileName = "",
+ lastUpdated = testDate,
+ contentHash = "",
+ metadata = ValidationPackageMetadata.create(
+ name = "",
+ majorVersion = 1,
+ minorVersion = 0,
+ patchVersion = 0,
+ summary = "",
+ description = ""
+ )
+ )
+ Assert.False(ValidationPackageIndex.identityEquals a b)
+
+ []
+ let ``identityEquals returns true for identical version with suffixes``() =
+ let a = ValidationPackageIndex.create(
+ repoPath = "",
+ fileName = "",
+ lastUpdated = testDate,
+ contentHash = "",
+ metadata = ValidationPackageMetadata.create(
+ name = "",
+ majorVersion = 1,
+ minorVersion = 0,
+ patchVersion = 0,
+ summary = "",
+ description = "",
+ PreReleaseVersionSuffix = "some",
+ BuildMetadataVersionSuffix = "suffix"
+ )
+ )
+ let b = ValidationPackageIndex.create(
+ repoPath = "",
+ fileName = "",
+ lastUpdated = testDate,
+ contentHash = "",
+ metadata = ValidationPackageMetadata.create(
+ name = "",
+ majorVersion = 1,
+ minorVersion = 0,
+ patchVersion = 0,
+ summary = "",
+ description = "",
+ PreReleaseVersionSuffix = "some",
+ BuildMetadataVersionSuffix = "suffix"
+ )
+ )
+ Assert.True(ValidationPackageIndex.identityEquals a b)
+
module CommentFrontmatterIO =
open System.IO