Skip to content

Commit

Permalink
Merge pull request dotnet#2753 from pgavlin/BuildRyuJitPackage
Browse files Browse the repository at this point in the history
Add additional logging to BuildRyuJitPackage.
  • Loading branch information
pgavlin committed Jan 20, 2016
2 parents 81b3930 + 098a3a2 commit 17cf0ea
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/.nuget/BuildRyuJitPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,23 @@ function Get-Latest-Blob-Name
return $chosenBlob
}

# Set the CWD
[System.Environment]::CurrentDirectory = Get-Location

# Get the list of blobs in storage
$json = (azure storage blob list -a $storageAccount -k $storageKey $storageContainer --json) -join ""
$blobs = ConvertFrom-Json $json
$json = ""
$blobs = @()
try
{
$json = (azure storage blob list -a $storageAccount -k $storageKey $storageContainer --json) -join ""
$blobs = ConvertFrom-Json $json
}
catch
{
Write-Error "Could not fetch blobs from Azure."
Write-Error "Response: $json"
exit 1
}

# Find, fetch, and extract the latest Ubuntu and OSX blobs
[System.Reflection.Assembly]::LoadWithPartialName("System.IO.Compression.FileSystem") | Out-Null
Expand All @@ -84,7 +98,7 @@ if (!$osxBlob)
azure storage blob download -m -q -a $storageAccount -k $storageKey $storageContainer $ubuntuBlob
if ($LastExitCode -ne 0)
{
Write-Error "Failed to fetch Ubuntu drop $ubuntuDrop from Azure."
Write-Error "Failed to fetch Ubuntu drop $ubuntuBlob from Azure."
exit 1
}

Expand Down Expand Up @@ -149,7 +163,7 @@ $packages = @(
# Note: nuget appears to exit with code 0 in every case, so there's no way to detect failure here
# other than looking at the output.
foreach ($package in $packages) {
Invoke-Expression "$nugetPath pack $packageOutputDir\$package.nuspec -NoPackageAnalysis -NoDefaultExludes -OutputDirectory $packageOutputDir"
Invoke-Expression "$nugetPath pack $packageOutputDir\$package.nuspec -NoPackageAnalysis -NoDefaultExcludes -OutputDirectory $packageOutputDir"
Invoke-Expression "$nugetPath push -NonInteractive $packageOutputDir\$package.nupkg -s $feed $apiKey"
}

Expand Down

0 comments on commit 17cf0ea

Please sign in to comment.