Created
February 20, 2020 09:39
-
-
Save mattbrailsford/823cfb6fa683bcdfc966a02d7bfedf15 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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)" | |
nuget | |
path: packages | |
displayName: Cache NuGet packages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment