Skip to content

Instantly share code, notes, and snippets.

View nathanwoulfe's full-sized avatar

Nathan Woulfe nathanwoulfe

View GitHub Profile
- powershell: | # generates a hash of all packages.config and saves each on a single line on 'packages.hash.txt'
Get-FileHash -Algorithm MD5 -Path (Get-ChildItem packages.config -Recurse) >> packages.hash.txt
Write-Host "Hash File saved to packages.hash.txt"
displayName: 'Calculate and save packages.config hash'
- task: Cache@2
inputs:
key: 'nuget | "$(Agent.OS)" | packages.hash.txt'
restoreKeys: |
nuget | "$(Agent.OS)"