2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-16 02:39:55 +00:00
async-std/ci/install-mdbook.sh
James Munns c6e4c659c4 Restore Version Sort (#121)
Since we only build the book on Linux for now, restore the `--version-sort` flag for gnu sort. This makes me feel better that when sorting numbering oddities (e.g. multiple digits) will be handled correctly.

This was removed when I was trying to get this script to work on Windows and OSX, which is no longer relevant.
2019-08-28 17:16:02 +02:00

19 lines
633 B
Bash
Executable file

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