diff --git a/Deploy/PSGallery.PSDeploy.ps1 b/Deploy/PSGallery.PSDeploy.ps1 index 7191a97..8dc8054 100644 --- a/Deploy/PSGallery.PSDeploy.ps1 +++ b/Deploy/PSGallery.PSDeploy.ps1 @@ -1,5 +1,5 @@ # Publish to gallery with a few restrictions -if ($env:BHBuildSystem -ine 'Unknown' -and $env:BHBranchName -eq "master") { +if ($env:BHBuildSystem -ine 'Unknown' -and $env:BHBranchName -eq "master" -and $ENV:PsGalleryApiKey) { Deploy Module { By PSGalleryModule { FromSource $Env:BHPSModulePath diff --git a/psakefile.ps1 b/psakefile.ps1 index 469a546..a78a16d 100644 --- a/psakefile.ps1 +++ b/psakefile.ps1 @@ -25,7 +25,7 @@ Task Init { "Prepare module output" Remove-Item -Path $Env:BHBuildOutput -Recurse -Force -ErrorAction SilentlyContinue New-Item -Path $Env:BHPSModulePath -Force -ItemType Directory - Copy-Item -Path ./* -Destination $Env:BHPSModulePath -Recurse -Exclude @('BuildOutput','appveyor.yml','build.ps1','psakefile.ps1') + Copy-Item -Path ./* -Destination $Env:BHPSModulePath -Recurse -Exclude @('BuildOutput','Deploy','appveyor.yml','build.ps1','psakefile.ps1') "Build System" Get-Item ENV:BH*