Skip to content

Commit

Permalink
Merge pull request #3759 from olydis/fix-metadata
Browse files Browse the repository at this point in the history
slightly more robust and flexible AutoRest version detection
  • Loading branch information
cormacpayne authored Oct 3, 2017
2 parents d9ea976 + 8567bab commit 1903cf1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tools/generateMetadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,18 @@ Catch
Write-Host ""
Write-Host "2) AutoRest information"
Write-Host "Requested version:" $Args[2]
Write-Host "Latest version: " (autorest --list-installed | Where {$_ -like "*Latest Core Installed*"}).Split()[-1]
Try
{
Write-Host "Bootstrapper version: " (npm list -g autorest)
}
Catch{}
Try
{
Write-Host "Latest installed version: " (autorest --list-installed | Where {$_ -like "*Latest Core Installed*"}).Split()[-1]
}
Catch{}
Try
{
Write-Host "Latest installed version: " (autorest --list-installed | Where {$_ -like "*@microsoft.azure/autorest-core*"} | Select -Last 1).Split('|')[3]
}
Catch{}

0 comments on commit 1903cf1

Please sign in to comment.