Staging
v0.5.1
Revision 6c38841c08edd6b0727903ec3f1acd10dc9766f6 authored by Łukasz Langa on 29 June 2020, 22:30:11 UTC, committed by Łukasz Langa on 29 June 2020, 22:30:11 UTC
1 parent dc8ce8e
Raw File
find-sdk.yml
# Locate the Windows SDK and add its binaries directory to PATH
#
# `toolname` can be overridden to use a different marker file.

parameters:
  toolname: signtool.exe

steps:
  - powershell: |
      $kitroot = (gp 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\').KitsRoot10
      $tool = (gci -r "$kitroot\Bin\*\${{ parameters.toolname }}" | sort FullName -Desc | select -First 1)
      if (-not $tool) {
          throw "SDK is not available"
      }
      Write-Host "##vso[task.prependpath]$($tool.Directory)"
      Write-Host "Adding $($tool.Directory) to PATH"
    displayName: 'Add WinSDK tools to path'
back to top