@@ -650,14 +650,9 @@ Task -Name PackageChocolatey -Description "Packs the module and example package"
650650 if (isAppVeyor) {
651651 Get-ChildItem $buildArtifactsDirectory - Filter * .nupkg | Foreach-Object {
652652 $nugetPath = ($_ | Resolve-Path ).Path;
653+ $convertedPath = Convert-Path $nugetPath ;
653654
654- if (Test-Path $nugetPath ) {
655- Write-Output " Pushing artifact to AppVeyor..." ;
656- Push-AppveyorArtifact (Convert-Path $nugetPath );
657- Write-Output " AppVeyor Upload completed." ;
658- } else {
659- Write-Output " Unable to find path of artifact, so can't upload."
660- }
655+ Push-AppveyorArtifact (Convert-Path $convertedPath );
661656 }
662657 }
663658 }
@@ -677,8 +672,11 @@ Task -Name DeployDevelopPackageToMyGet -Description "Takes the packaged Chocolat
677672 Write-Output " Deploying to MyGet..."
678673
679674 exec {
680- Get-ChildItem $buildArtifactsDirectory - Filter * .nupkg | Foreach-Object {
681- & $nugetExe push $_ $env: MyGetDevelopApiKey - source $env: MyGetDevelopFeedUrl
675+ Get-ChildItem $buildArtifactsDirectory - Filter * .nupkg | Foreach-Object {
676+ $nugetPath = ($_ | Resolve-Path ).Path;
677+ $convertedPath = Convert-Path $nugetPath ;
678+
679+ & $nugetExe push $convertedPath $env: MyGetDevelopApiKey - source $env: MyGetDevelopFeedUrl
682680 }
683681 }
684682
@@ -697,8 +695,11 @@ Task -Name DeployMasterPackageToMyGet -Description "Takes the packaged Chocolate
697695 Write-Output " Deploying to MyGet..."
698696
699697 exec {
700- Get-ChildItem $buildArtifactsDirectory - Filter * .nupkg | Foreach-Object {
701- & $nugetExe push $_ $env: MyGetMasterApiKey - source $env: MyGetMasterFeedUrl
698+ Get-ChildItem $buildArtifactsDirectory - Filter * .nupkg | Foreach-Object {
699+ $nugetPath = ($_ | Resolve-Path ).Path;
700+ $convertedPath = Convert-Path $nugetPath ;
701+
702+ & $nugetExe push $convertedPath $env: MyGetMasterApiKey - source $env: MyGetMasterFeedUrl
702703 }
703704 }
704705
@@ -717,11 +718,14 @@ Task -Name DeployPackageToChocolateyAndNuget -Description "Takes the packages an
717718 Write-Output " Deploying to Chocolatey and Nuget..."
718719
719720 exec {
720- Get-ChildItem $buildArtifactsDirectory - Filter * .nupkg | Foreach-Object {
721+ Get-ChildItem $buildArtifactsDirectory - Filter * .nupkg | Foreach-Object {
722+ $nugetPath = ($_ | Resolve-Path ).Path;
723+ $convertedPath = Convert-Path $nugetPath ;
724+
721725 if (& _ -like ' *cli*' ) {
722- & $nugetExe push $_ $env: ChocolateyApiKey - source $env: ChocolateyFeedUrl
726+ & $nugetExe push $convertedPath $env: ChocolateyApiKey - source $env: ChocolateyFeedUrl
723727 } else {
724- & $nugetExe push $_ $env: NugetApiKey - source $env: NugetFeedUrl
728+ & $nugetExe push $convertedPath $env: NugetApiKey - source $env: NugetFeedUrl
725729 }
726730 }
727731 }
0 commit comments