Build Managed Batch Parser NuGet package (#1747)

This commit is contained in:
Cheena Malhotra
2022-11-07 10:03:32 -08:00
committed by GitHub
parent 2856ff241f
commit d33c97c079
13 changed files with 259 additions and 68 deletions

View File

@@ -3,6 +3,18 @@ pr: none
stages:
- stage: Build
variables:
- name: buildConfiguration
value: 'Release'
# Major version number for the release
- name: Major
value: '3'
# Minor version number for the release (should be incremented post a stable release)
- name: Minor
value: '0'
# Set to true to build a stable release.
- name: StableRelease
value: 'false'
jobs:
- job: Build
pool:

View File

@@ -9,7 +9,7 @@ steps:
inputs:
filename: build.cmd
arguments: '-target=all -mono'
- task: DotNetCoreCLI@2
displayName: 'dotnet restore test/Microsoft.SqlTools.ServiceLayer.UnitTests'
inputs:
@@ -49,6 +49,27 @@ steps:
codeCoverageTool: 'Cobertura'
summaryFileLocation: '$(Agent.TempDirectory)/coverlet/reports/Cobertura.xml'
- task: PowerShell@2
displayName: 'Generate Nuspec Version'
inputs:
targetType: 'inline'
script: |
$propsFile = '$(Build.SourcesDirectory)\Directory.Build.Props'
$props = New-Object XML
$props.Load($propsFile)
$propGroup = $props.Project.PropertyGroup;
$versionPre = $env:Major + '.' + $env:Minor + '.'
if($env:StableRelease.Equals('true')) {
$version = $versionPre + '0';
} else {
$version = $versionPre + $(Build.BuildNumber) + '-' + $propGroup.VersionSuffix.'#text'
}
$nuspecFile = '$(Build.SourcesDirectory)\packages\Microsoft.SqlTools.ManagedBatchParser\Microsoft.SqlTools.ManagedBatchParser.nuspec'
$nuspec = New-Object XML
$nuspec.Load($nuspecFile)
$nuspec.package.metadata.version = $version;
$nuspec.Save($nuspecFile)
- task: Npm@1
displayName: 'npm install -g gulp-cli'
inputs:
@@ -56,6 +77,33 @@ steps:
verbose: false
customCommand: 'install -g gulp-cli'
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP CodeSigning - SNK only'
inputs:
ConnectedServiceName: 'Code Signing'
FolderPath: '$(Build.SourcesDirectory)/artifacts/publish/Microsoft.SqlTools.ServiceLayer/default/net472/'
Pattern: 'Microsoft.SqlTools.ManagedBatchParser.dll'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode" : "CP-235847-SN",
"operationSetCode" : "StrongNameSign",
"Parameters" : [],
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-235847-SN",
"operationSetCode" : "StrongNameVerify",
"Parameters" : [],
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
SessionTimeout: 600
MaxConcurrency: 5
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
displayName: 'ESRP CodeSigning - sha256 only'
inputs:
@@ -114,7 +162,7 @@ steps:
inputs:
filename: build.cmd
arguments: '-target=dotnetpackpublished -mono'
- task: BatchScript@1
displayName: "Build and Package service tool projects"
env: