mach/gpu-dawn/dev/bundle-release.sh
Stephen Gutekanst f607b70c09 gpu-dawn: CI: cleanup between bundle regeneration
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-02-27 19:48:29 -07:00

26 lines
584 B
Bash
Executable file

#!/usr/bin/env bash
set -exuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"/..
rm -rf out/ out.tar.gz headers.json headers.json.gz
# Prepare the `out/` directory that we will bundle.
mkdir out/
cp -R libs/dawn/include out/
cp -R libs/dawn/out/Debug/gen/include/* out/include/
cp libs/dawn/LICENSE out/
zig version > out/ZIG_VERSION
# Bundle headers.json.gz
pushd out
python ../dev/dir_to_json.py > ../headers.json
popd
gzip -9 headers.json
# Copy the binary into the out/ directory
cp zig-out/lib/libdawn.a out/
# Create out.tar.gz bundle
pushd out
tar -czvf ../out.tar.gz .
popd