Skip to content

Commit 1aa27a5

Browse files
authored
Merge pull request #13 from ionide/better-packaging
2 parents 676e40c + 75f7ce2 commit 1aa27a5

File tree

5 files changed

+13
-53
lines changed

5 files changed

+13
-53
lines changed

build/build.fs

Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -7,63 +7,12 @@ open Fake.DotNet
77
open Fake.Core.TargetOperators
88
open System
99

10-
let changelogFilename = __SOURCE_DIRECTORY__ </> ".." </> "CHANGELOG.md"
11-
let changelog = Changelog.load changelogFilename
12-
let mutable latestEntry =
13-
if Seq.isEmpty changelog.Entries
14-
then Changelog.ChangelogEntry.New("0.0.1", "0.0.1-alpha.1", Some DateTime.Today, None, [], false)
15-
else changelog.LatestEntry
16-
1710
let configuration = Environment.environVarOrDefault "configuration" "Release"
1811
let project = "LanguageServerProtocol"
1912
let buildDir = "src" </> project </> "bin" </> "Debug"
2013
let buildReleaseDir = "src" </> project </> "bin" </> "Release"
2114
let releaseDir = "release"
2215

23-
let summary =
24-
"Building Language Server Protocol server and clients in F#"
25-
26-
let authors = "chethusk; Krzysztof-Cieslak;"
27-
let tags = "LSP; editor tooling"
28-
29-
let gitOwner = "ionide"
30-
let gitName = "LanguageServerProtocol"
31-
let gitHome = "https://github.com/" + gitOwner
32-
let gitUrl = gitHome + "/" + gitName
33-
34-
let packageReleaseNotes =
35-
sprintf "%s/blob/v%s/CHANGELOG.md" gitUrl latestEntry.NuGetVersion
36-
37-
// Helper function to remove blank lines
38-
let isEmptyChange =
39-
function
40-
| Changelog.Change.Added s
41-
| Changelog.Change.Changed s
42-
| Changelog.Change.Deprecated s
43-
| Changelog.Change.Fixed s
44-
| Changelog.Change.Removed s
45-
| Changelog.Change.Security s
46-
| Changelog.Change.Custom (_, s) -> String.isNullOrWhiteSpace s.CleanedText
47-
48-
let releaseNotes =
49-
latestEntry.Changes
50-
|> List.filter (isEmptyChange >> not)
51-
|> List.map (fun c -> " * " + c.ToString())
52-
|> String.concat "\n"
53-
54-
let properties =
55-
[ ("Version", latestEntry.AssemblyVersion)
56-
("Authors", authors)
57-
("PackageProjectUrl", gitUrl)
58-
("PackageTags", tags)
59-
("RepositoryType", "git")
60-
("RepositoryUrl", gitUrl)
61-
("PackageLicenseExpression", "MIT")
62-
("PackageReleaseNotes", packageReleaseNotes)
63-
("PackageDescription", summary)
64-
("EnableSourceLink", "true") ]
65-
66-
6716
let clean = fun _ ->
6817
Shell.cleanDirs [ buildDir; buildReleaseDir; ]
6918

@@ -74,7 +23,7 @@ let build = fun _ ->
7423
DotNet.build (fun p ->
7524
{ p with
7625
Configuration = DotNet.BuildConfiguration.fromString configuration
77-
MSBuildParams = { MSBuild.CliArguments.Create () with Properties = properties } }) "LanguageServerProtocol.sln"
26+
}) "LanguageServerProtocol.sln"
7827

7928

8029
let replaceFsLibLog = fun _ ->
@@ -95,7 +44,7 @@ let release = fun _ ->
9544
{ p with
9645
OutputPath = Some (__SOURCE_DIRECTORY__ </> ".." </> releaseDir)
9746
Configuration = DotNet.BuildConfiguration.fromString configuration
98-
MSBuildParams = { MSBuild.CliArguments.Create () with Properties = properties } }) "src/Ionide.LanguageServerProtocol.fsproj"
47+
}) "src/Ionide.LanguageServerProtocol.fsproj"
9948

10049
let push = fun _ ->
10150
let key =

paket.dependencies

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ framework: netstandard2.0
66
nuget Newtonsoft.Json
77
nuget FSharp.Core
88
nuget Dotnet.ReproducibleBuilds copy_local:true
9+
nuget Ionide.KeepAChangelog.Tasks copy_local:true
910

1011
nuget Microsoft.NETFramework.ReferenceAssemblies
1112
github TheAngryByrd/FsLibLog:f81cba440bf0476bb4e2262b57a067a0d6ab78a7 src/FsLibLog/FsLibLog.fs

paket.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ NUGET
88
Microsoft.SourceLink.GitHub (>= 1.0)
99
Microsoft.SourceLink.GitLab (>= 1.0)
1010
FSharp.Core (6.0.1)
11+
Ionide.KeepAChangelog.Tasks (0.1) - copy_local: true
1112
Microsoft.Build.Tasks.Git (1.1.1) - copy_local: true
1213
Microsoft.NETFramework.ReferenceAssemblies (1.0.2)
1314
Microsoft.SourceLink.AzureRepos.Git (1.1.1) - copy_local: true

src/Ionide.LanguageServerProtocol.fsproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,21 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6+
<ChangelogFile>$(MSBuildThisFileDirectory)../CHANGELOG.md</ChangelogFile>
7+
<Description>Library for implementing Language Server Protocol in F#.</Description>
8+
<PackageTags>LSP, editor tooling</PackageTags>
9+
<Authors>chethusk; Krzysztof-Cieslak</Authors>
10+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
11+
<PackageReadmeFile>README.md</PackageReadmeFile>
12+
<PackageProjectUrl>https://github.com/ionide/LanguageServerProtocol</PackageProjectUrl>
613
</PropertyGroup>
714
<ItemGroup>
815
<Compile Include="..\paket-files\TheAngryByrd\FsLibLog\src\FsLibLog\FsLibLog.fs">
916
<Paket>True</Paket>
1017
<Link>paket-files/FsLibLog.fs</Link>
1118
</Compile>
1219
<Compile Include="LanguageServerProtocol.fs" />
20+
<None Include="../README.md" Pack="true" PackagePath="\" />
1321
</ItemGroup>
1422
<Import Project="..\.paket\Paket.Restore.targets" />
1523
</Project>

src/paket.references

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Newtonsoft.Json
22
FSharp.Core
33
Dotnet.ReproducibleBuilds
4+
Ionide.KeepAChangelog.Tasks
45

56
Microsoft.NETFramework.ReferenceAssemblies
67
File: FsLibLog.fs

0 commit comments

Comments
 (0)