mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-07 06:59:49 -06:00
add windows binary-zip
Using 7-Zip
This commit is contained in:
@@ -68,9 +68,31 @@ linuxZip = (src, dest) ->
|
||||
.then R.tap(checkZipSize)
|
||||
.catch onError
|
||||
|
||||
# resolves with zipped filename
|
||||
windowsZip = (src, dest) ->
|
||||
# use 7Zip to zip
|
||||
# http://www.7-zip.org/
|
||||
cmd = "7z a #{dest} #{src}#{path.sep}*"
|
||||
console.log("windows zip: #{cmd}")
|
||||
|
||||
onZipFinished = () ->
|
||||
console.log("✅ zip finished")
|
||||
|
||||
onError = (err) ->
|
||||
console.error("⛔️ could not zip #{src} into #{dest}")
|
||||
console.error(err.message)
|
||||
throw err
|
||||
|
||||
execa.shell(cmd)
|
||||
.then onZipFinished
|
||||
.then R.always(dest)
|
||||
.then R.tap(checkZipSize)
|
||||
.catch onError
|
||||
|
||||
zippers = {
|
||||
linux: linuxZip
|
||||
darwin: macZip
|
||||
win32: windowsZip
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in New Issue
Block a user