mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -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:
|
inputs:
|
||||||
filename: build.cmd
|
filename: build.cmd
|
||||||
arguments: '-target=dotnetpackpublished -mono'
|
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
|
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||||
displayName: 'ESRP Code Signing - Nuget Package'
|
displayName: 'ESRP Code Signing - Nuget Package'
|
||||||
|
|||||||
15
build.cake
15
build.cake
@@ -52,6 +52,7 @@ public class BuildPlan
|
|||||||
public string[] PackageProjects { get; set; }
|
public string[] PackageProjects { get; set; }
|
||||||
// The set of projects that we want to call dotnet pack on which require publishing being done first
|
// 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[] PackagePublishedProjects { get; set; }
|
||||||
|
public string[] DotnetToolProjects { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
var buildPlan = JsonConvert.DeserializeObject<BuildPlan>(
|
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>
|
/// <summary>
|
||||||
/// Run all tests for .NET Desktop and .NET Core
|
/// Run all tests for .NET Desktop and .NET Core
|
||||||
|
|||||||
@@ -46,5 +46,9 @@
|
|||||||
"runtime.ubuntu.16.04-x64.native.Microsoft.SqlToolsService",
|
"runtime.ubuntu.16.04-x64.native.Microsoft.SqlToolsService",
|
||||||
"runtime.win-x64.native.Microsoft.SqlToolsService",
|
"runtime.win-x64.native.Microsoft.SqlToolsService",
|
||||||
"runtime.osx-arm64.native.Microsoft.SqlToolsService"
|
"runtime.osx-arm64.native.Microsoft.SqlToolsService"
|
||||||
|
],
|
||||||
|
"DotnetToolProjects": [
|
||||||
|
"Microsoft.SqlTools.ServiceLayer",
|
||||||
|
"Microsoft.Kusto.ServiceLayer"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(BUILD_DOTNET_TOOL)' == 'true'">
|
<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>
|
<PackAsTool>true</PackAsTool>
|
||||||
<ToolCommandName>$(AssemblyName)</ToolCommandName>
|
<ToolCommandName>$(AssemblyName)</ToolCommandName>
|
||||||
<PackageOutputPath>./nupkg</PackageOutputPath>
|
<PackageOutputPath>./nupkg</PackageOutputPath>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
<Choose>
|
<Choose>
|
||||||
<When Condition="'$(BUILD_DOTNET_TOOL)' == 'true'">
|
<When Condition="'$(BUILD_DOTNET_TOOL)' == 'true'">
|
||||||
<PropertyGroup>
|
<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>
|
<PackAsTool>true</PackAsTool>
|
||||||
<ToolCommandName>$(AssemblyName)</ToolCommandName>
|
<ToolCommandName>$(AssemblyName)</ToolCommandName>
|
||||||
<PackageOutputPath>./nupkg</PackageOutputPath>
|
<PackageOutputPath>./nupkg</PackageOutputPath>
|
||||||
|
|||||||
Reference in New Issue
Block a user