Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ReleaseNotes to NugetHelper #893

Merged
merged 1 commit into from
Aug 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>