modularize PSGallery Deployment branch

This commit is contained in:
OCram85 2017-10-23 09:54:40 +02:00
parent d364c09f29
commit b92cb2609b
2 changed files with 7 additions and 3 deletions

View File

@ -52,5 +52,5 @@ deploy:
on: on:
branch: dev # release from master branch only branch: dev # release from master branch only
#after_deploy: after_deploy:
# - ps: Invoke-AppVeyorPSGallery - ps: Invoke-AppVeyorPSGallery -OnBranch 'master'

View File

@ -138,7 +138,11 @@ Function Invoke-CoverageReport() {
Function Invoke-AppVeyorPSGallery() { Function Invoke-AppVeyorPSGallery() {
[CmdletBinding()] [CmdletBinding()]
Param() Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[String]$OnBranch
)
Expand-Archive -Path (".\bin\{0}.zip" -f $CALLSIGN) -DestinationPath ("C:\Users\appveyor\Documents\WindowsPowerShell\Modules\{0}\" -f $CALLSIGN) -Verbose Expand-Archive -Path (".\bin\{0}.zip" -f $CALLSIGN) -DestinationPath ("C:\Users\appveyor\Documents\WindowsPowerShell\Modules\{0}\" -f $CALLSIGN) -Verbose
Import-Module -Name $CALLSIGN -Verbose -Force Import-Module -Name $CALLSIGN -Verbose -Force
Write-Host "Available Package Provider:" -ForegroundColor Yellow Write-Host "Available Package Provider:" -ForegroundColor Yellow