diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 0372e3c745..7242f7e523 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,9 +1,9 @@ +#### 2.40.14 - 07.01.2016 +* BUGFIX: Fixed problem with prerelease versions during pack - https://github.com/fsprojects/Paket/issues/1316 + #### 2.40.13 - 07.01.2016 * BUGFIX: Do not copy dlls from paket-files - https://github.com/fsprojects/Paket/issues/1341 -#### 2.40.12 - 07.01.2016 -* BUGFIX: Fixed problem with prerelease versions during pack - https://github.com/fsprojects/Paket/issues/1316 - #### 2.40.11 - 06.01.2016 * BUGFIX: Fixed problem with @ char in paths during pack - https://github.com/fsprojects/Paket/pull/1351 diff --git a/src/Paket.Core/VersionRange.fs b/src/Paket.Core/VersionRange.fs index c4a882eb2b..f248523164 100644 --- a/src/Paket.Core/VersionRange.fs +++ b/src/Paket.Core/VersionRange.fs @@ -217,11 +217,21 @@ type VersionRequirement = | GreaterThan(version) -> sprintf "(%s,)" (normalize version) | Maximum(version) -> sprintf "(,%s]" (normalize version) | LessThan(version) -> sprintf "(,%s)" (normalize version) - | Specific(version) -> - let v = normalize version - if v.EndsWith "-prerelease" then - sprintf "%s" v // #1316 we should not overspecify - else + | Specific(version) -> + let v = normalize version + if v.EndsWith "-prerelease" then + let getMinDelimiter (v:VersionRangeBound) = + match v with + | VersionRangeBound.Including -> "[" + | VersionRangeBound.Excluding -> "(" + + let getMaxDelimiter (v:VersionRangeBound) = + match v with + | VersionRangeBound.Including -> "]" + | VersionRangeBound.Excluding -> ")" + + sprintf "[%s,%s]" v (v.Replace("-prerelease","")) + else sprintf "[%s]" v | OverrideAll(version) -> sprintf "[%s]" (normalize version) | Range(fromB, from,_to,_toB) ->