From 20aade4bdd59e84ce6e6c4cd4d351f6c9434f783 Mon Sep 17 00:00:00 2001 From: dfinke Date: Mon, 8 Oct 2018 14:17:09 -0400 Subject: [PATCH] Add Switch $DontCreateZip --- DoTests.ps1 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/DoTests.ps1 b/DoTests.ps1 index 916d7e7..ce81979 100644 --- a/DoTests.ps1 +++ b/DoTests.ps1 @@ -1,3 +1,7 @@ +param( + [Switch]$DontCreateZip +) + ## # Used in Appveyor.yml ## @@ -8,10 +12,12 @@ $PSVersionTable.PSVersion ## Otherwise the EPPlus.dll is in use after the Pester run $ModuleVersion = (Get-Content -Raw .\ImportExcel.psd1) | Invoke-Expression | ForEach-Object ModuleVersion -$dest = "ImportExcel-{0}-{1}.zip" -f $ModuleVersion, (Get-Date).ToString("yyyyMMddHHmmss") -Compress-Archive -Path . -DestinationPath .\$dest +if (!$DontCreateZip) { + $dest = "ImportExcel-{0}-{1}.zip" -f $ModuleVersion, (Get-Date).ToString("yyyyMMddHHmmss") + Compress-Archive -Path . -DestinationPath .\$dest +} -if ((Get-Module -ListAvailable pester) -eq $null) { +if ($null -eq (Get-Module -ListAvailable pester)) { Install-Module -Name Pester -Repository PSGallery -Force -Scope CurrentUser }