Skip to content

Commit

Permalink
Allow to overwrite versions in template files without id - fixes #1321
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Dec 28, 2015
1 parent 3c9304e commit 8a76179
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 5 additions & 1 deletion src/Paket.Core/PackageProcess.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions src/Paket/Paket.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<StartArguments>pack output D:\code\paketbug\output</StartArguments>
<StartArguments>install</StartArguments>
<StartArguments>restore</StartArguments>
<StartArguments>update -f</StartArguments>
<StartArguments>pack output "without-id" specific-version A 1.2.3 specific-version B 4.5.6 specific-version C 7.8.9</StartArguments>
<StartAction>Project</StartAction>
<StartProgram>paket.exe</StartProgram>
<StartWorkingDirectory>c:\code\Paketkopie</StartWorkingDirectory>
Expand All @@ -48,7 +48,7 @@
<StartWorkingDirectory>d:\code\paketrepro</StartWorkingDirectory>
<StartWorkingDirectory>D:\code\Paket\integrationtests\scenarios\i001270-net461\temp</StartWorkingDirectory>
<StartWorkingDirectory>C:\code\restore</StartWorkingDirectory>
<StartWorkingDirectory>C:\code\paketkopie</StartWorkingDirectory>
<StartWorkingDirectory>C:\code\repro</StartWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand Down

0 comments on commit 8a76179

Please sign in to comment.