#**************************************************************************# #** QUADARAX DEPLOYMENT SCRIPTS **# #** File: 301_zip.ps1 **# #** Description: PowerShell script library to zip minimal version **# #** Version: 1.0. **# #** Updated: 29.7.2019 **# #**************************************************************************# param( # Defines alternative zip file. If not defined uses automatic name [string] $alternativeZipFileName ) . ./000_bootstrap.ps1 # Validate inputs if (!$alternativeZipFileName) { $alternativeZipFileName = "$zipNamePrefix$(get-date -f yyyy-MM-dd).7z"} Write-Host ("Zipping directory {0}" -f $projectDir) -ForegroundColor Yellow Write-Host ("Zipping to archive {0}" -f $alternativeZipFileName) -ForegroundColor Yellow Remove-Item $alternativeZipFileName -Force Write-Host "*** ZIPPING - START ***" -ForegroundColor Green # -xr!.vs -xr!*.user -xr!packages -xr!TestResults -xr!resharper* 7zip a -tzip $alternativeZipFileName $projectDir\ -mx0 -xr!bin -xr!obj -xr!packages -xr!TestResults -xr!resharper* Write-Host "*** ZIPPING - END ***" -ForegroundColor Green