Files
wasmtime/ci/build-src-tarball.sh
Alex Crichton ad0f169d64 Fix naming of the source tarball (#6068)
This refactoring from #5766 accidentally broke the tag name calculation
for the `build-src-tarball.sh` script so this fixes it by copying over
the same logic from `build-tarballs.sh`.
2023-03-20 16:23:10 +00:00

21 lines
485 B
Bash
Executable File

#!/bin/bash
set -ex
# Determine the name of the tarball
tag=dev
if [[ $GITHUB_REF == refs/heads/release-* ]]; then
tag=v${GITHUB_REF:19}
fi
pkgname=wasmtime-$tag-src
# Vendor all crates.io dependencies since this is supposed to be an
# offline-only-compatible tarball
mkdir .cargo
cargo vendor > .cargo/config.toml
# Create the tarball from the destination
tar -czf /tmp/$pkgname.tar.gz --transform "s/^\./$pkgname/S" --exclude=.git .
mkdir -p dist
mv /tmp/$pkgname.tar.gz dist/