forked from mirror/async-std
Fix regex, also install cargo-update with trust
This commit is contained in:
parent
de62620460
commit
eba85c3ede
3 changed files with 21 additions and 2 deletions
|
@ -18,7 +18,7 @@ matrix:
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- rustup component add rustfmt
|
- rustup component add rustfmt
|
||||||
- (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
|
- (test -x $HOME/.cargo/bin/cargo-install-update || ./ci/install-cargo-update.sh)
|
||||||
- (test -x $HOME/.cargo/bin/mdbook || ./ci/install-mdbook.sh)
|
- (test -x $HOME/.cargo/bin/mdbook || ./ci/install-mdbook.sh)
|
||||||
- cargo install-update -a
|
- cargo install-update -a
|
||||||
|
|
||||||
|
|
19
ci/install-cargo-update.sh
Executable file
19
ci/install-cargo-update.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 accept any tagged release
|
||||||
|
local tag=$(git ls-remote --tags --refs --exit-code \
|
||||||
|
https://github.com/nabijaczleweli/cargo-update \
|
||||||
|
| cut -d/ -f3 \
|
||||||
|
| grep -E '^v[0-9\.]+$' \
|
||||||
|
| sort --version-sort \
|
||||||
|
| tail -n1)
|
||||||
|
|
||||||
|
curl -LSfs https://japaric.github.io/trust/install.sh | \
|
||||||
|
sh -s -- --git nabijaczleweli/cargo-update --tag $tag
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
|
@ -8,7 +8,7 @@ main() {
|
||||||
local tag=$(git ls-remote --tags --refs --exit-code \
|
local tag=$(git ls-remote --tags --refs --exit-code \
|
||||||
https://github.com/rust-lang-nursery/mdbook \
|
https://github.com/rust-lang-nursery/mdbook \
|
||||||
| cut -d/ -f3 \
|
| cut -d/ -f3 \
|
||||||
| grep -E '^v0.3.[0-9]+$' \
|
| grep -E '^v0\.3\.[0-9]+$' \
|
||||||
| sort --version-sort \
|
| sort --version-sort \
|
||||||
| tail -n1)
|
| tail -n1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue