Skip to content

Commit

Permalink
🚀 Fix up publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
vexx32 committed Apr 5, 2021
1 parent 70637f4 commit deff01b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build/Publish-Collection.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ param(

$Tarballs = Get-ChildItem -Path $Path -Recurse -File -Filter '*.tar.gz'
Write-Host "Found collection artifact(s) at:"
Write-Host $($PackageFile.FullName -join [Environment]::NewLine)
Write-Host $($Tarballs.FullName -join [Environment]::NewLine)

foreach ($file in $Tarballs) {
if ($PSBoundParameters.ContainsKey('Server')) {
foreach ($item in $Server) {
Write-Host "Publishing collection '$($file.Name)' to targeted server: [$item]"
ansible-galaxy collection publish $file.FullName --server $item
ansible-galaxy collection publish --server $item $file.FullName
}
}
else {
Write-Host "Publishing collection '$($file.Name)' to all configured servers"
ansible-galaxy collection publish $PackageFile.FullName
ansible-galaxy collection publish $file.FullName
}
}

0 comments on commit deff01b

Please sign in to comment.