From 32bb371145febb1afd0b6fc454d7c04afe42f6d1 Mon Sep 17 00:00:00 2001 From: dfinke Date: Sun, 15 Jul 2018 12:41:47 -0400 Subject: [PATCH] add version and timestamp to zip artifact --- DoTests.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DoTests.ps1 b/DoTests.ps1 index 621b73f..ebf7a25 100644 --- a/DoTests.ps1 +++ b/DoTests.ps1 @@ -2,7 +2,10 @@ $PSVersionTable.PSVersion ## Create the zip before the tests run ## Otherwise the EPPlus.dll is in use after the Pester run -Compress-Archive -Path . -DestinationPath .\ImportExcel.zip +$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 ((Get-Module -ListAvailable pester) -eq $null) { Install-Module -Name Pester -Repository PSGallery -Force