From b92cb2609bb0e80004d5bbfdd2aca122380ddaf1 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Mon, 23 Oct 2017 09:54:40 +0200 Subject: [PATCH] modularize PSGallery Deployment branch --- appveyor.yml | 4 ++-- tools/AppVeyor.psm1 | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d900c21..65f7e79 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -52,5 +52,5 @@ deploy: on: branch: dev # release from master branch only -#after_deploy: -# - ps: Invoke-AppVeyorPSGallery +after_deploy: + - ps: Invoke-AppVeyorPSGallery -OnBranch 'master' diff --git a/tools/AppVeyor.psm1 b/tools/AppVeyor.psm1 index 58f916d..cd63f10 100644 --- a/tools/AppVeyor.psm1 +++ b/tools/AppVeyor.psm1 @@ -138,7 +138,11 @@ Function Invoke-CoverageReport() { Function Invoke-AppVeyorPSGallery() { [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 Import-Module -Name $CALLSIGN -Verbose -Force Write-Host "Available Package Provider:" -ForegroundColor Yellow