Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions tools/appveyor.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -517,16 +517,23 @@ function Push-Artifact
param(
[Parameter(Mandatory)]
[ValidateScript({Test-Path -Path $_})]
$Path
$Path,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be more clear if $Path was named $ArtifactPath and $Name to $ArtifactName.

[string]
$Name
)

if($env:Appveyor)
if(!$Name)
{
$artifactName = [system.io.path]::GetFileName($Path)
}
else
{
Push-AppveyorArtifact $Path
$artifactName = $Name
}
elseif ($env:TF_BUILD -and $env:BUILD_REASON -ne 'PullRequest') {

if ($env:TF_BUILD) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If $env:TF_BUILD is not defined then this cmdlet does nothing. Is that Ok, or should a warning be generated?

# In VSTS
Write-Host "##vso[artifact.upload containerfolder=artifacts;artifactname=artifacts;]$Path"
Write-Host "##vso[artifact.upload containerfolder=$artifactName;artifactname=$artifactName;]$Path"
}
}

Expand Down