From e9001fecb0114f4da3236cfc8b6c19ffa92b1f7a Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Sat, 20 Oct 2018 16:51:21 -0700 Subject: [PATCH] Update package version to 0.2.1 and update azure sign tool to 2.0.17 --- build.ps1 | 25 ++++++++++++++----------- src/CodeSign.targets | 4 ++-- version.props | 2 +- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/build.ps1 b/build.ps1 index 38b4d79..dcef589 100755 --- a/build.ps1 +++ b/build.ps1 @@ -35,18 +35,21 @@ if ($ci) { $CodeSign = $sign -or ($ci -and -not $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT -and ($IsWindows -or -not $IsCoreCLR)) if ($CodeSign) { - $astDir = "$PSScriptRoot/.build/tools/store/AzureSignTool/1.0.1/" - $AzureSignToolPath = "$astDir/AzureSignTool.exe" - if (-not (Test-Path $AzureSignToolPath)) { - New-Item $astDir -ItemType Directory -ErrorAction Ignore | Out-Null - Invoke-WebRequest https://github.com/vcsjones/AzureSignTool/releases/download/1.0.1/AzureSignTool.zip ` - -OutFile "$astDir/AzureSignTool.zip" - Expand-Archive "$astDir/AzureSignTool.zip" -DestinationPath $astDir + $toolsDir = "$PSScriptRoot/.build/tools" + $AzureSignToolPath = "$toolsDir/azuresigntool" + if ($IsWindows) { + $AzureSignToolPath += ".exe" } - $nstDir = "$PSScriptRoot/.build/tools/store/NuGetKeyVaultSignTool/1.1.4/" - $NuGetKeyVaultSignTool = "$nstDir/tools/net471/NuGetKeyVaultSignTool.exe" - if (-not (Test-Path $NuGetKeyVaultSignTool)) { + if (-not (Test-Path $AzureSignToolPath)) { + exec dotnet tool install --tool-path $toolsDir ` + AzureSignTool ` + --version 2.0.17 + } + + $nstDir = "$toolsDir/nugetsigntool/1.1.4" + $NuGetKeyVaultSignToolPath = "$nstDir/tools/net471/NuGetKeyVaultSignTool.exe" + if (-not (Test-Path $NuGetKeyVaultSignToolPath)) { New-Item $nstDir -ItemType Directory -ErrorAction Ignore | Out-Null Invoke-WebRequest https://github.com/onovotny/NuGetKeyVaultSignTool/releases/download/v1.1.4/NuGetKeyVaultSignTool.1.1.4.nupkg ` -OutFile "$nstDir/NuGetKeyVaultSignTool.zip" @@ -55,7 +58,7 @@ if ($CodeSign) { $MSBuildArgs += '-p:CodeSign=true' $MSBuildArgs += "-p:AzureSignToolPath=$AzureSignToolPath" - $MSBuildArgs += "-p:NuGetKeyVaultSignTool=$NuGetKeyVaultSignTool" + $MSBuildArgs += "-p:NuGetKeyVaultSignToolPath=$NuGetKeyVaultSignToolPath" } $artifacts = "$PSScriptRoot/artifacts/" diff --git a/src/CodeSign.targets b/src/CodeSign.targets index 20d8c7c..e93369a 100644 --- a/src/CodeSign.targets +++ b/src/CodeSign.targets @@ -38,12 +38,12 @@ BeforeTargets="Pack" Inputs="$(PackageOutputAbsolutePath)$(PackageId).$(PackageVersion).nupkg" Outputs="$(PackageSignCacheFile)"> - + $(PackageOutputAbsolutePath)$(PackageId).$(PackageVersion).nupkg - "$(NuGetKeyVaultSignTool)" sign + "$(NuGetKeyVaultSignToolPath)" sign $(NupkgSignToolArgs) --file-digest sha256 $(NupkgSignToolArgs) --timestamp-rfc3161 http://timestamp.digicert.com $(NupkgSignToolArgs) --timestamp-digest sha256 diff --git a/version.props b/version.props index fd9fae1..7b79eda 100644 --- a/version.props +++ b/version.props @@ -1,6 +1,6 @@ - 0.2.0 + 0.2.1 rtm $(VersionPrefix)-$(VersionSuffix) $(VersionPrefix)