2019-08-27 13:23:34 +00:00
|
|
|
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 \
|
2019-08-27 13:33:46 +00:00
|
|
|
| grep -E '^v0\.3\.[0-9]+$' \
|
2019-08-28 15:16:02 +00:00
|
|
|
| sort --version-sort \
|
2019-08-27 13:23:34 +00:00
|
|
|
| tail -n1)
|
|
|
|
|
|
|
|
curl -LSfs https://japaric.github.io/trust/install.sh | \
|
|
|
|
sh -s -- --git rust-lang-nursery/mdbook --tag $tag
|
|
|
|
}
|
|
|
|
|
|
|
|
main
|