13: add ci r=japaric a=japaric



Co-authored-by: Jorge Aparicio <jorge@japaric.io>
This commit is contained in:
bors[bot]
2018-08-10 06:11:06 +00:00
9 changed files with 68 additions and 8 deletions

20
.travis.yml Normal file
View File

@@ -0,0 +1,20 @@
language: rust
install:
- bash ci/install.sh
script:
- bash ci/script.sh
after_success:
- bash ci/after-success.sh
branches:
only:
- master
- staging
- trying
notifications:
email:
on_success: never

17
ci/after-success.sh Normal file
View File

@@ -0,0 +1,17 @@
set -euxo pipefail
main() {
mkdir ghp-import
curl -Ls https://github.com/davisp/ghp-import/archive/master.tar.gz |
tar --strip-components 1 -C ghp-import -xz
./ghp-import/ghp_import.py book
# NOTE(+x) don't print $GH_TOKEN to the console!
set +x
git push -fq https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git gh-pages && echo OK
}
if [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ]; then
main
fi

15
ci/install.sh Normal file
View File

@@ -0,0 +1,15 @@
set -euxo pipefail
main() {
local tag=$(git ls-remote --tags --refs --exit-code https://github.com/rust-lang-nursery/mdbook \
| cut -d/ -f3 \
| grep -E '^v[0.1.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
pip install linkchecker --user
}
main

9
ci/script.sh Normal file
View File

@@ -0,0 +1,9 @@
set -euxo pipefail
main() {
mdbook build
linkchecker book
}
main

View File

@@ -12,7 +12,7 @@ Let's get familiar with the hardware we'll be working with.
## STM32F3DISCOVERY (the "F3")
<p align="center">
<img title="F3" src="assets/f3.jpg">
<img title="F3" src="/assets/f3.jpg">
</p>
We'll refer to this board as "F3" throughout this book.
@@ -49,4 +49,3 @@ What does this board contain?
- There's a second USB port, labeled "USB USER" that is connected to the main microcontroller, the
STM32F303VCT6, and can be used in applications.

View File

@@ -89,6 +89,6 @@ $ cargo install itm --vers 0.2.1
Now follow the instructions specific to the OS you are using:
- [Linux](intro/install/linux.html)
- [Windows](intro/install/windows.html)
- [macOS](intro/install/macos.html)
- [Linux](/intro/install/linux.html)
- [Windows](/intro/install/windows.html)
- [macOS](/intro/install/macos.html)

View File

@@ -96,7 +96,7 @@ $ # ^^^^
If `uucp` appears in the output. You are all set! Go to the [next section]. Otherwise, keep reading:
[next section]: intro/install/verify.html
[next section]: /intro/install/verify.html
- Add yourself to the `uucp` group.

View File

@@ -26,4 +26,4 @@ Caskroom/tap` first and try again.
That's all! Go to the [next section].
[next section]: 03-setup/verify.html
[next section]: /intro/install/verify.html

View File

@@ -59,4 +59,4 @@ instructions and make sure you install the right (32-bit or 64-bit) version of t
That's all! Go to the [next section].
[next section]: intro/install/verify.html
[next section]: /intro/install/verify.html