Browse Source

ci: Use something else for zip files on Windows (#2941)

Apparently `powershell Compress-Archive` produces zip files with
backslashes in filesnames which makes them unable to be extracted with
some Unix variants of extraction. For example [this failure][build] and
using macOS's built-in unzip feature it creates filenames with
backslashes in them rather than subdirectories.

[build]: https://github.com/bytecodealliance/wasmtime-go/runs/2680596219?check_suite_focus=true
pull/2944/head
Alex Crichton 3 years ago
committed by GitHub
parent
commit
8127346b4d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      ci/build-tarballs.sh

5
ci/build-tarballs.sh

@ -76,9 +76,8 @@ mktarball() {
tar -cvf - -C tmp $dir | xz -9 -T0 > dist/$dir.tar.xz
else
# Note that this runs on Windows, and it looks like GitHub Actions doesn't
# have a `zip` tool there, so we use powershell
(cd tmp && powershell Compress-Archive $dir $dir.zip)
mv tmp/$dir.zip dist
# have a `zip` tool there, so we use something else
(cd tmp && 7z a ../dist/$dir.zip $dir/)
fi
}

Loading…
Cancel
Save