Skip to content

Commit

Permalink
Merge pull request #893 from ovu/do/AddReleaseNotesToNugetHelper
Browse files Browse the repository at this point in the history
Add ReleaseNotes to NugetHelper
  • Loading branch information
forki committed Aug 2, 2015
2 parents 69ef5a5 + 0d7411c commit 2872e95
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/FakeLib/NuGet/NugetHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ type NuSpecPackage =
RequireLicenseAcceptance : bool
Description : string
Language : string
ReleaseNotes : string
Tags : string }
member x.Name = sprintf "%s %s" x.Id x.Version
override x.ToString() = x.Name
Expand Down Expand Up @@ -469,6 +470,7 @@ let getNuspecProperties (nuspec : string) =
Description = getValue "description"
Language = getValue "language"
Tags = getValue "tags"
ReleaseNotes = getValue "releaseNotes"
Url = String.Empty
IsLatestVersion = false
Created = DateTime.MinValue
Expand Down Expand Up @@ -517,6 +519,7 @@ let extractFeedPackageFromXml (entry : Xml.XmlNode) =
Owners = author
Language = property "Language"
Tags = property "Tags"
ReleaseNotes = property "ReleaseNotes"
ProjectUrl = property "ProjectUrl"
LicenseUrl = property "LicenseUrl"
RequireLicenseAcceptance = boolProperty "RequireLicenseAcceptance"
Expand Down
3 changes: 3 additions & 0 deletions src/test/FsCheck.Fake/TestNuget.fs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ let ``Can parse package information from nuget.org stream`` () =
RequireLicenseAcceptance = false
Description = "FAKE - F# Make - is a build automation tool for .NET. Tasks and dependencies are specified in a DSL which is integrated in F#. This package bundles all extensions."
Language = "en-US"
ReleaseNotes = "FCS simplification - https://github.com/fsharp/FAKE/pull/773
Paket push task runs in parallel - https://github.com/fsharp/FAKE/pull/768"
Tags = "build fake f#" }

Assert.Equal<string>(expected.Id, result.Id)
Expand All @@ -47,4 +49,5 @@ let ``Can parse package information from nuget.org stream`` () =
Assert.Equal<string>(expected.Description, result.Description)
Assert.Equal<string>(expected.Language, result.Language)
Assert.Equal<string>(expected.Tags, result.Tags)
Assert.Equal<string>(expected.ReleaseNotes, result.ReleaseNotes)

2 changes: 2 additions & 0 deletions src/test/Test.FAKECore/PackageMgt/NuSpecFileSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public class nuspec_behaviours
It should_contain_the_version_placeholder =
() => Package.Version.ShouldEqual("@build.number@");

It should_contain_the_releasenotes_placeholder =
() => Package.ReleaseNotes.ShouldEqual("@releaseNotes@");
}

public class when_parsing_the_fake_nuspec_file
Expand Down
1 change: 1 addition & 0 deletions src/test/Test.FAKECore/TestData/fake_no_schema.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<iconUrl>@iconUrl@</iconUrl>
<projectUrl>http://www.github.com/fsharp/Fake</projectUrl>
<licenseUrl>http://www.github.com/fsharp/Fake/blob/master/License.txt</licenseUrl>
<releaseNotes>@releaseNotes@</releaseNotes>
<tags>build</tags>
</metadata>
</package>
1 change: 1 addition & 0 deletions src/test/Test.FAKECore/TestData/fake_schema_2011_08.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<iconUrl>@iconUrl@</iconUrl>
<projectUrl>http://www.github.com/fsharp/Fake</projectUrl>
<licenseUrl>http://www.github.com/fsharp/Fake/blob/master/License.txt</licenseUrl>
<releaseNotes>@releaseNotes@</releaseNotes>
<tags>build</tags>
</metadata>
</package>

0 comments on commit 2872e95

Please sign in to comment.