Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/ci/build-src-tarball.sh
1685 views
1
#!/bin/bash
2
3
set -ex
4
5
# Determine the name of the tarball
6
tag=dev
7
if [[ $GITHUB_REF == refs/heads/release-* ]]; then
8
tag=v$(./ci/print-current-version.sh)
9
fi
10
pkgname=wasmtime-$tag-src
11
12
# Vendor all crates.io dependencies since this is supposed to be an
13
# offline-only-compatible tarball
14
mkdir .cargo
15
cargo vendor > .cargo/config.toml
16
17
# Create the tarball from the destination
18
tar -czf /tmp/$pkgname.tar.gz --transform "s/^\./$pkgname/S" --exclude=.git .
19
mkdir -p dist
20
mv /tmp/$pkgname.tar.gz dist/
21
22
rm .cargo/config.toml
23
24