mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-15 07:12:35 +00:00
334540835c
this ensures we install the correct set of standard crates when working in the beta channel
32 lines
453 B
Bash
32 lines
453 B
Bash
# `before_deploy` phase: here we package the build artifacts
|
|
|
|
set -ex
|
|
|
|
mktempd() {
|
|
echo $(mktemp -d 2>/dev/null || mktemp -d -t tmp)
|
|
}
|
|
|
|
mk_artifacts() {
|
|
cargo build --target $TARGET --release
|
|
}
|
|
|
|
mk_tarball() {
|
|
local td=$(mktempd)
|
|
local out_dir=$(pwd)
|
|
|
|
cp target/$TARGET/release/mdbook $td
|
|
|
|
pushd $td
|
|
|
|
tar czf $out_dir/${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.tar.gz *
|
|
|
|
popd $td
|
|
rm -r $td
|
|
}
|
|
|
|
main() {
|
|
mk_artifacts
|
|
mk_tarball
|
|
}
|
|
|
|
main
|