mirror of
https://github.com/async-rs/async-std.git
synced 2025-05-13 10:31:27 +00:00
Implement installation using trust
This commit is contained in:
parent
8dff8951a6
commit
de62620460
2 changed files with 20 additions and 1 deletions
|
@ -19,7 +19,7 @@ matrix:
|
|||
before_script:
|
||||
- rustup component add rustfmt
|
||||
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
|
||||
- (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.3" mdbook)
|
||||
- (test -x $HOME/.cargo/bin/mdbook || ./ci/install-mdbook.sh)
|
||||
- cargo install-update -a
|
||||
|
||||
script:
|
||||
|
|
19
ci/install-mdbook.sh
Executable file
19
ci/install-mdbook.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
set -euxo pipefail
|
||||
|
||||
# Based on the Rust-Embedded WG's book CI
|
||||
# https://github.com/rust-embedded/book/blob/master/ci/install.sh
|
||||
|
||||
main() {
|
||||
# Note - this will only accept releases tagged with v0.3.x
|
||||
local tag=$(git ls-remote --tags --refs --exit-code \
|
||||
https://github.com/rust-lang-nursery/mdbook \
|
||||
| cut -d/ -f3 \
|
||||
| grep -E '^v0.3.[0-9]+$' \
|
||||
| sort --version-sort \
|
||||
| tail -n1)
|
||||
|
||||
curl -LSfs https://japaric.github.io/trust/install.sh | \
|
||||
sh -s -- --git rust-lang-nursery/mdbook --tag $tag
|
||||
}
|
||||
|
||||
main
|
Loading…
Reference in a new issue