From 5ebd2c0527f08bd6b607b31904c9b15888221f0b Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 9 Sep 2020 10:00:48 -0700 Subject: [PATCH] Fix macOS CI deploy. --- ci/make-release.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci/make-release.sh b/ci/make-release.sh index 8d9fa34d..d3b26189 100755 --- a/ci/make-release.sh +++ b/ci/make-release.sh @@ -17,6 +17,12 @@ cd target/release case $1 in ubuntu* | macos*) asset="mdbook-$TAG-$host.tar.gz" + # There is a bug with BSD tar on macOS where the first 8MB of the file are + # sometimes all NUL bytes. See https://github.com/actions/cache/issues/403 + # and https://github.com/rust-lang/cargo/issues/8603 for some more + # information. An alternative solution here is to install GNU tar, but + # flushing the disk cache seems to work, too. + sudo /usr/sbin/purge tar czf ../../$asset mdbook ;; windows*)