Skip to content

Commit eb2835a

Browse files
author
Gary Ewan Park
committed
(GH-29) Correcting uploading of artifacts
- Not entirely sure why this isn't working, but to work around issue for now, let's use Test-Path, and if the path doesn't exist, ignore it for now.
1 parent 5854636 commit eb2835a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

BuildScripts/default.ps1

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ Task -Name RunCodeCoverage -Description "Use OpenCover, NUnit and Coveralls to a
591591
Write-Output ("************ RunCodeCoverage Successful ************");
592592
} catch {
593593
Write-Error $_
594-
Write-Output ("************ PackageChocolatey Failed ************")
594+
Write-Output ("************ RunCodeCoverage Failed ************")
595595
}
596596
}
597597

@@ -632,7 +632,15 @@ Task -Name PackageChocolatey -Description "Packs the module and example package"
632632

633633
if(isAppVeyor) {
634634
Get-ChildItem $buildArtifactsDirectory -Filter *.nupkg | Foreach-Object {
635-
Push-AppveyorArtifact ($_ | Resolve-Path).Path;
635+
$nugetPath = ($_ | Resolve-Path).Path;
636+
637+
if(Test-Path $nugetPath) {
638+
Write-Output "Pushing artifact to AppVeyor...";
639+
Push-AppveyorArtifact $nugetPath;
640+
Write-Output "AppVeyor Upload completed.";
641+
} else {
642+
Write-Output "Unable to find path of artifact, so can't upload."
643+
}
636644
}
637645
}
638646
}

0 commit comments

Comments
 (0)