-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Port to Ionide.KeepAChangelog #132
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,9 @@ | |
|
||
open Fake.Core | ||
open Fake.DotNet | ||
open Fake.Tools | ||
open Fake.IO | ||
open Fake.IO.FileSystemOperators | ||
open Fake.IO.Globbing.Operators | ||
open Fake.Core.TargetOperators | ||
open Fake.Api | ||
|
||
// -------------------------------------------------------------------------------------- | ||
// Information about the project to be used at NuGet and in AssemblyInfo files | ||
|
@@ -39,31 +36,6 @@ let nugetDir = "./out/" | |
|
||
|
||
System.Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ | ||
let changelogFilename = "CHANGELOG.md" | ||
let changelog = Changelog.load changelogFilename | ||
let latestEntry = changelog.LatestEntry | ||
|
||
// Helper function to remove blank lines | ||
let isEmptyChange = | ||
function | ||
| Changelog.Change.Added s | ||
| Changelog.Change.Changed s | ||
| Changelog.Change.Deprecated s | ||
| Changelog.Change.Fixed s | ||
| Changelog.Change.Removed s | ||
| Changelog.Change.Security s | ||
| Changelog.Change.Custom (_, s) -> String.isNullOrWhiteSpace s.CleanedText | ||
|
||
let nugetVersion = latestEntry.NuGetVersion | ||
|
||
let packageReleaseNotes = | ||
sprintf "%s/blob/v%s/CHANGELOG.md" gitUrl latestEntry.NuGetVersion | ||
|
||
let releaseNotes = | ||
latestEntry.Changes | ||
|> List.filter (isEmptyChange >> not) | ||
|> List.map (fun c -> " * " + c.ToString()) | ||
|> String.concat "\n" | ||
|
||
// -------------------------------------------------------------------------------------- | ||
// Helpers | ||
|
@@ -126,14 +98,12 @@ Target.create | |
"Pack" | ||
(fun _ -> | ||
let properties = | ||
[ ("Version", nugetVersion) | ||
("Authors", authors) | ||
[ ("Authors", authors) | ||
("PackageProjectUrl", gitUrl) | ||
("PackageTags", tags) | ||
("RepositoryType", "git") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these source control properties can be removed - sourcelink/dotnet.reproducible builds infer them correctly for you. |
||
("RepositoryUrl", gitUrl) | ||
("PackageLicenseExpression", "MIT") | ||
("PackageReleaseNotes", packageReleaseNotes) | ||
("PackageDescription", summary) | ||
("EnableSourceLink", "true") ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this one can be removed as well - sourcelink is just auto-on with the dotnet.reproduciblebuild package. |
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
FSharp.Core | ||
FSharp.Compiler.Service | ||
Dotnet.ReproducibleBuilds | ||
Dotnet.ReproducibleBuilds | ||
Ionide.KeepAChangelog.Tasks |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Dotnet.ReproducibleBuilds | ||
Ionide.KeepAChangelog.Tasks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove this project url as well - it defaults to the repo git url that sourcelink derives from the
origin
uri