Add Switch $DontCreateZip

This commit is contained in:
dfinke
2018-10-08 14:17:09 -04:00
parent b6965e0724
commit 20aade4bdd

View File

@@ -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
}