diff --git a/tool/fetch-release-artifacts b/tool/fetch-release-artifacts new file mode 100755 index 00000000..8d3ebf9e --- /dev/null +++ b/tool/fetch-release-artifacts @@ -0,0 +1,26 @@ +#! /usr/bin/env bash +set -e +heredir=$(realpath "$(dirname "$0")/..") +( + [ -d out/dist-unzipped-nested-tmp ] && rm -rf out/dist-unzipped-nested-tmp + mkdir -p out/dist-unzipped-nested-tmp + cd out/dist-unzipped-nested-tmp + gh run download -n wheels-apple -n wheels-linux -n aarch64-apple-darwin.tar -n aarch64-apple-darwin.tar.sha256sum -n aarch64-pc-windows-msvc.tar -n aarch64-pc-windows-msvc.tar.sha256sum -n aarch64-unknown-linux-gnu.tar -n aarch64-unknown-linux-gnu.tar.sha256sum -n aarch64-unknown-linux-musl.tar -n aarch64-unknown-linux-musl.tar.sha256sum -n armv7-unknown-linux-gnueabihf.tar -n armv7-unknown-linux-gnueabihf.tar.sha256sum -n armv7-unknown-linux-musleabihf.tar -n armv7-unknown-linux-musleabihf.tar.sha256sum -n x86_64-pc-windows-msvc.tar -n x86_64-pc-windows-msvc.tar.sha256sum -n x86_64-unknown-linux-gnu.tar -n x86_64-unknown-linux-gnu.tar.sha256sum -n x86_64-unknown-linux-musl.tar -n x86_64-unknown-linux-musl.tar.sha256sum + ( + mkdir dist-unzipped-tmp + find . -type f | while read f + do mv "$f" "dist-unzipped-tmp/$(basename "$f")" + done + ( + mkdir dist-tmp + find . -type f | while read f + do zip -r "$f.zip" "$f" && mv "$f.zip" "dist-tmp/$(basename "$f").zip" + done + [ -d "$heredir/out/dist" ] && rm -rf "$heredir/out/dist" + [ -d "$heredir/out" ] || mkdir -p "$heredir/out" + mv dist-tmp "$heredir/out/dist" + echo "$heredir/out/dist" + ) + ) +) +