Skip to content

Commit

Permalink
Conditionally set build property for PSGallery API key
Browse files Browse the repository at this point in the history
  • Loading branch information
devblackops committed Feb 28, 2021
1 parent 5e431a5 commit 0ebdea0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion psakeFile.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
properties {
$PSBPreference.Publish.PSRepositoryApiKey = $galleryApiKey.GetNetworkCredential().password
if ($galleryApiKey) {
$PSBPreference.Publish.PSRepositoryApiKey = $galleryApiKey.GetNetworkCredential().password
}
}

task default -depends test
Expand Down

0 comments on commit 0ebdea0

Please sign in to comment.