Skip to content

Commit

Permalink
Fixed problem with prerelease versions during pack - references #1316
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Jan 7, 2016
1 parent 321b74c commit 15fe82b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
6 changes: 3 additions & 3 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
20 changes: 15 additions & 5 deletions src/Paket.Core/VersionRange.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand Down

0 comments on commit 15fe82b

Please sign in to comment.