-
Notifications
You must be signed in to change notification settings - Fork 34
Build a book for each tag version (including master) #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
doc/build.sh
Outdated
do | ||
git checkout $tag | ||
mdbook build -d book/$tag | ||
cargo doc --target-dir book/api/$tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be better to bundle everything under the version. So we'd have something like:
mdbook build -d $tag/book
cargo doc --target-dir $tag/api
There's one issue I just realised. If we build the docs for each release, then the more releases (i.e. tags) we have, the longer it will take for travis to complete. Luckily this only happens on master commits, but it will still take a long time once we have a couple of releases. There is a way to tell travis to do incremental commits which don't force push. This would allow us to only build the latest tag + master which would leave the previous doc builds in the repo. But we'll have to see how well that works. Edit: The problem with this solution is that travis doesn't run if we only push a tag (I think), so to force the new tags being build and published we'd have to do an extra commit after we pushed a new tag, which is a bit inconvenient. |
As discussed offline I changed the PR to only generated docs for the master branch and use docs.rs for the releases. Books still get created for the master branch and each release tag and will be hosted on softdevteam.github.io/grmtools. One problem with |
Just to check: the thought here is to wait until rust 1.31 is out before merging this? |
Given it will be part of the release then, yes. The alternative is to provide our own index page. |
Since 1.31 is out, we think this PR might now be mergeable. @ptersilie If things work for you locally, please rebase against master and force push so that I can merge. If it doesn't work then... we think again :) |
It appears the index-page feature is still unstable. I tried using it as described here (https://github.com/rust-lang/rust/blob/e53a5ffd6b1c28903b4ad9a4c433fd554802cd9c/src/doc/rustdoc/src/unstable-features.md#--index-page-provide-a-top-level-landing-page-for-docs) but couldn't get it to work at all. Back to the drawing board, I guess. |
I'm a bit out of thoughts on this one TBH... |
I managed to get the default index-page working and also adjusted the travis deploy script to pick up the new folder. |
You probably want to cherry-pick b0182a9 into this branch? |
Addressed your comment and merged in master. Let's wait for the tests and then we can rebase and merge. |
If the tests succeed, please squash and merge without waiting for me to say so. |
This commit changes the book building script so that it creates and publishes a book for each tag as well as the master branch. It also builds the documentation (cargo doc) for the master branch for and publishes it to grmtools/api.
Squashed and rebased! |
PR in progress: We should test this build script once this repo has tags.
This PR changes the book building script so that it creates and
publishes a book for each tag as well as the master branch.