diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d73802fe7b..8cc12f9aee 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 2.39.8 - 28.12.2015 +* BUGFIX: Allow to overwrite versions in template files without id - https://github.com/fsprojects/Paket/issues/1321 + #### 2.39.7 - 28.12.2015 * BUGFIX: Accept dotnet54 as moniker diff --git a/src/Paket.Core/PackageProcess.fs b/src/Paket.Core/PackageProcess.fs index 20d9b90aa6..fd9147dd50 100644 --- a/src/Paket.Core/PackageProcess.fs +++ b/src/Paket.Core/PackageProcess.fs @@ -34,10 +34,14 @@ let private merge buildConfig buildPlatform versionFromAssembly specificVersions match md with | Valid completeCore -> { templateFile with Contents = CompleteInfo(completeCore, mergedOpt) } | _ -> + let versionFromAssembly = + match md.Id |> Option.bind (fun id -> Map.tryFind id specificVersions) with + | Some _ as specificVersion -> specificVersion + | None -> getVersion versionFromAssembly attribs let merged = { Id = md.Id - Version = md.Version ++ getVersion versionFromAssembly attribs + Version = md.Version ++ versionFromAssembly Authors = md.Authors ++ getAuthors attribs Description = md.Description ++ getDescription attribs Symbols = md.Symbols } diff --git a/src/Paket/Paket.fsproj b/src/Paket/Paket.fsproj index a7c38b62ed..7d272c0772 100644 --- a/src/Paket/Paket.fsproj +++ b/src/Paket/Paket.fsproj @@ -38,7 +38,7 @@ pack output D:\code\paketbug\output install restore - update -f + pack output "without-id" specific-version A 1.2.3 specific-version B 4.5.6 specific-version C 7.8.9 Project paket.exe c:\code\Paketkopie @@ -48,7 +48,7 @@ d:\code\paketrepro D:\code\Paket\integrationtests\scenarios\i001270-net461\temp C:\code\restore - C:\code\paketkopie + C:\code\repro pdbonly