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

Make the tool package nicer #792

Merged
merged 4 commits into from
Jun 15, 2021
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
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]
},
"paket": {
"version": "5.257.0",
"version": "6.0.0-rc002",
"commands": [
"paket"
]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [windows-2019, macos-10.15, ubuntu-20.04]
dotnet: [5.0.200]
dotnet: [5.0.300]
fail-fast: false # we have timing issues on some OS, so we want them all to run

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
release:
strategy:
matrix:
dotnet: [5.0.200]
dotnet: [5.0.300]

runs-on: ubuntu-20.04

Expand Down
1 change: 0 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<Title>FsAutoComplete</Title>
<Product>FsAutoComplete</Product>
<Description>A command line tool for interfacing with FSharp.Compiler.Service over a pipe.</Description>
<PackageLicenseExpression Condition=" '$(PackAsTool)' != 'true' ">Apache-2.0</PackageLicenseExpression>
<NoWarn>3186</NoWarn><!-- circumvent an error with the fake dependencymanager for paket: https://github.com/dotnet/fsharp/issues/8678 -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
8 changes: 6 additions & 2 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ Target.create "ReleaseArchive" (fun _ ->
|> Shell.copy "bin/pkgs"
)

let versionProp = "Version", release.AssemblyVersion
let packAsToolProp = "PackAsTool", "true"
let latestReleaseNotesProp = "PackageReleaseNotes", release.Notes |> String.concat "\n"

Target.create "LocalRelease" (fun _ ->
Directory.ensure "bin/release_netcore"
Shell.cleanDirs [ "bin/release_netcore" ]
Expand All @@ -76,15 +80,15 @@ Target.create "LocalRelease" (fun _ ->
OutputPath = Some (__SOURCE_DIRECTORY__ </> "bin/release_netcore")
Framework = Some "net5.0"
Configuration = DotNet.BuildConfiguration.fromString configuration
MSBuildParams = { MSBuild.CliArguments.Create () with Properties = [ "Version", release.AssemblyVersion ] } }) "src/FsAutoComplete"
MSBuildParams = { MSBuild.CliArguments.Create () with Properties = [ versionProp ] } }) "src/FsAutoComplete"

Directory.ensure "bin/release_as_tool"
Shell.cleanDirs [ "bin/release_as_tool" ]
DotNet.pack (fun p ->
{ p with
OutputPath = Some (__SOURCE_DIRECTORY__ </> "bin/release_as_tool")
Configuration = DotNet.BuildConfiguration.fromString configuration
MSBuildParams = { MSBuild.CliArguments.Create () with Properties = [ "Version", release.AssemblyVersion; "PackAsTool", "true" ] } }) "src/FsAutoComplete"
MSBuildParams = { MSBuild.CliArguments.Create () with Properties = [ versionProp; packAsToolProp; latestReleaseNotesProp ] } }) "src/FsAutoComplete"
)

Target.create "Clean" (fun _ ->
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "5.0.200"
"version": "5.0.300"
}
}
1 change: 1 addition & 0 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ group Build
nuget Fake.DotNet.MsBuild
nuget Fake.Api.GitHub
nuget Microsoft.Build
nuget MSBuild.StructuredLogger
2 changes: 1 addition & 1 deletion paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ NUGET
System.Security.AccessControl (>= 5.0)
System.Security.Principal.Windows (>= 5.0)
Mono.Posix.NETStandard (1.0)
MSBuild.StructuredLogger (2.1.272)
MSBuild.StructuredLogger (2.1.507)
Microsoft.Build (>= 16.4)
Microsoft.Build.Framework (>= 16.4)
Microsoft.Build.Tasks.Core (>= 16.4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<AssemblyName>fsautocomplete.backgroundservices</AssemblyName>
<ServerGarbageCollection>true</ServerGarbageCollection>
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\LanguageServerProtocol\LanguageServerProtocol.fsproj">
Expand Down
1 change: 1 addition & 0 deletions src/FsAutoComplete.Core/FsAutoComplete.Core.fsproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\LanguageServerProtocol\LanguageServerProtocol.fsproj" />
Expand Down
1 change: 1 addition & 0 deletions src/FsAutoComplete.Logging/FsAutoComplete.Logging.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\paket-files\TheAngryByrd\FsLibLog\src\FsLibLog\FsLibLog.fs">
Expand Down
11 changes: 11 additions & 0 deletions src/FsAutoComplete/FsAutoComplete.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@
<AssemblyName>fsautocomplete</AssemblyName>
<ServerGarbageCollection>true</ServerGarbageCollection>
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
<!-- Paket currently lacks readme file support, tracked at https://github.com/fsprojects/Paket/issues/4031 -->
<PackageReadmeFile>README.md</PackageReadmeFile>
<Description>A community-developed Language Server Protocol implementation for F#</Description>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageIcon>logo.png</PackageIcon>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
<Authors>FsAutoComplete contributors</Authors>
</PropertyGroup>
<ItemGroup>
<None Include="../../README.md" Pack="true" PackagePath="\"/>
<None Include="logo.png" Pack="true" PackagePath="\"/>
<Compile Include="Options.fs" />
<Compile Include="CommandResponse.fs" />
<Compile Include="JsonSerializer.fs" />
Expand All @@ -26,9 +35,11 @@
<ProjectReference Include="..\FsAutoComplete.BackgroundServices\FsAutoComplete.BackgroundServices.fsproj" />
<ProjectReference Include="..\LanguageServerProtocol\LanguageServerProtocol.fsproj" />
</ItemGroup>

<PropertyGroup Condition=" '$(PackAsTool)' == 'true' ">
<AssemblyName>dotnet-fsautocomplete</AssemblyName>
<PackageId>fsautocomplete</PackageId>
<PackageType>DotnetTool</PackageType>

<!-- workaround for not being able to have p2p dependencies in tool output dir https://github.com/nuget/home/issues/3891#issuecomment-377319939 -->
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
Expand Down
Binary file added src/FsAutoComplete/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/LanguageServerProtocol/LanguageServerProtocol.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down