diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /vendor/mdbook/ci/make-release.sh | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/mdbook/ci/make-release.sh')
-rwxr-xr-x | vendor/mdbook/ci/make-release.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/vendor/mdbook/ci/make-release.sh b/vendor/mdbook/ci/make-release.sh index 761923bf9..8a62b700b 100755 --- a/vendor/mdbook/ci/make-release.sh +++ b/vendor/mdbook/ci/make-release.sh @@ -11,16 +11,21 @@ fi TAG=${GITHUB_REF#*/tags/} host=$(rustc -Vv | grep ^host: | sed -e "s/host: //g") +target=$2 +if [ "$host" != "$target" ] +then + export "CARGO_TARGET_$(echo $target | tr a-z- A-Z_)_LINKER"=rust-lld +fi export CARGO_PROFILE_RELEASE_LTO=true -cargo build --bin mdbook --release -cd target/release +cargo build --bin mdbook --release --target $target +cd target/$target/release case $1 in ubuntu*) - asset="mdbook-$TAG-$host.tar.gz" + asset="mdbook-$TAG-$target.tar.gz" tar czf ../../$asset mdbook ;; macos*) - asset="mdbook-$TAG-$host.tar.gz" + asset="mdbook-$TAG-$target.tar.gz" # There is a bug with BSD tar on macOS where the first 8MB of the file are # sometimes all NUL bytes. See https://github.com/actions/cache/issues/403 # and https://github.com/rust-lang/cargo/issues/8603 for some more @@ -30,7 +35,7 @@ case $1 in tar czf ../../$asset mdbook ;; windows*) - asset="mdbook-$TAG-$host.zip" + asset="mdbook-$TAG-$target.zip" 7z a ../../$asset mdbook.exe ;; *) |