mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-05 17:24:59 -05:00
Add build task to create dotnet tools for SQL Tools and Kusto services. (#1582)
This commit is contained in:
@@ -108,7 +108,14 @@ steps:
|
||||
inputs:
|
||||
filename: build.cmd
|
||||
arguments: '-target=dotnetpackpublished -mono'
|
||||
continueOnError: true
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: "Build and Package service tool projects"
|
||||
env:
|
||||
BUILD_DOTNET_TOOL: "true"
|
||||
inputs:
|
||||
filename: build.cmd
|
||||
arguments: "-target=dotnetpackservicetools -mono"
|
||||
|
||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||
displayName: 'ESRP Code Signing - Nuget Package'
|
||||
|
||||
15
build.cake
15
build.cake
@@ -52,6 +52,7 @@ public class BuildPlan
|
||||
public string[] PackageProjects { get; set; }
|
||||
// The set of projects that we want to call dotnet pack on which require publishing being done first
|
||||
public string[] PackagePublishedProjects { get; set; }
|
||||
public string[] DotnetToolProjects { get; set; }
|
||||
}
|
||||
|
||||
var buildPlan = JsonConvert.DeserializeObject<BuildPlan>(
|
||||
@@ -273,7 +274,19 @@ Task("DotnetPackPublished")
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Packages dotnet tool projects specified in DotnetToolProjects.
|
||||
/// </summary>
|
||||
Task("DotnetPackServiceTools")
|
||||
.Does(() =>
|
||||
{
|
||||
foreach (var project in buildPlan.DotnetToolProjects)
|
||||
{
|
||||
var outputFolder = System.IO.Path.Combine(nugetPackageFolder);
|
||||
var projectFolder = System.IO.Path.Combine(sourceFolder, project);
|
||||
DotnetPack(outputFolder, projectFolder, project);
|
||||
}
|
||||
});
|
||||
|
||||
/// <summary>
|
||||
/// Run all tests for .NET Desktop and .NET Core
|
||||
|
||||
@@ -46,5 +46,9 @@
|
||||
"runtime.ubuntu.16.04-x64.native.Microsoft.SqlToolsService",
|
||||
"runtime.win-x64.native.Microsoft.SqlToolsService",
|
||||
"runtime.osx-arm64.native.Microsoft.SqlToolsService"
|
||||
],
|
||||
"DotnetToolProjects": [
|
||||
"Microsoft.SqlTools.ServiceLayer",
|
||||
"Microsoft.Kusto.ServiceLayer"
|
||||
]
|
||||
}
|
||||
@@ -21,6 +21,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(BUILD_DOTNET_TOOL)' == 'true'">
|
||||
<PackageDescription>.NET client Kusto Service application, usable as a dotnet tool. This package is intended to be used by internal applications only and should not be referenced directly.</PackageDescription>
|
||||
<PackAsTool>true</PackAsTool>
|
||||
<ToolCommandName>$(AssemblyName)</ToolCommandName>
|
||||
<PackageOutputPath>./nupkg</PackageOutputPath>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<Choose>
|
||||
<When Condition="'$(BUILD_DOTNET_TOOL)' == 'true'">
|
||||
<PropertyGroup>
|
||||
<PackageDescription>.NET client SQL Tools Service application, usable as a dotnet tool. This package is intended to be used by internal applications only and should not be referenced directly.</PackageDescription>
|
||||
<PackAsTool>true</PackAsTool>
|
||||
<ToolCommandName>$(AssemblyName)</ToolCommandName>
|
||||
<PackageOutputPath>./nupkg</PackageOutputPath>
|
||||
|
||||
Reference in New Issue
Block a user