diff options
| author | TitanSnow <[email protected]> | 2017-05-26 19:58:08 +0800 |
|---|---|---|
| committer | TitanSnow <[email protected]> | 2017-05-26 19:59:19 +0800 |
| commit | efd3e77d397fc3ffa2364f6e7b8132f48e28d926 (patch) | |
| tree | f0ea763f19ead534da4f8d95d4edc82a186a2c87 /scripts | |
| parent | c17a15739418d1c88417053c734921246c797b28 (diff) | |
throw error when artifact not found
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/getpb.ps1 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/getpb.ps1 b/scripts/getpb.ps1 index c90e2994f..9fa789be3 100644 --- a/scripts/getpb.ps1 +++ b/scripts/getpb.ps1 @@ -38,6 +38,7 @@ Function Get-AppVeyorArtifacts{ $jobId = $obj.build.jobs[$jobId].jobId $artifacts = Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts" -Headers $headers $artifactFileName = $artifacts[0].fileName + if($artifactFileName -ne "xmake.exe"){throw "artifact not found"} $localArtifactPath = "$DownloadDirectory\$artifactFileName" Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/$artifactFileName" -OutFile $localArtifactPath } |
