mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Build Managed Batch Parser NuGet package (#1747)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user