github.com/getgauge/gauge@v1.6.9/build/create_windows_zipfile.ps1 (about) 1 # ---------------------------------------------------------------- 2 # Copyright (c) ThoughtWorks, Inc. 3 # Licensed under the Apache License, Version 2.0 4 # See LICENSE.txt in the project root for license information. 5 # ---------------------------------------------------------------- 6 7 $zipsrc = $args[0] 8 $zipdst = $args[1] 9 10 If(Test-path $zipdst) {Remove-item $zipdst} 11 12 Add-Type -assembly "system.io.compression.filesystem" 13 14 Write-Host "Creating zip : $zipdst" 15 16 try { 17 [io.compression.zipfile]::CreateFromDirectory($zipsrc, $zipdst) 18 } 19 catch { 20 Write-Host -ForegroundColor Red "Unable to create zip : $($_.Exception)" 21 exit -1 22 }