Use the latest tag across all branches for the guide

This commit is contained in:
konstin 2018-05-30 15:25:13 +02:00
parent b4be009e38
commit 6448a016b1
1 changed files with 3 additions and 1 deletions

View File

@ -19,7 +19,9 @@ fi
# This builds the book in target/doc/guide. See https://github.com/rust-lang-nursery/mdBook/issues/698
mdbook build -d ../target/doc/guide guide
LASTEST_TAG=$(git tag -l "v*" | tail -n1)
# Get the lastest tag across all branches
# https://stackoverflow.com/a/7261049/3549270
LASTEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1 -l v*))
git clone -b gh-pages https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git gh_pages
cd gh_pages