Skip to content

Commit 8d8fde5

Browse files
bors[bot]japaric
andcommitted
Merge #6
6: add CI r=japaric a=japaric Co-authored-by: Jorge Aparicio <[email protected]>
2 parents d18b659 + 4433b46 commit 8d8fde5

File tree

5 files changed

+64
-0
lines changed

5 files changed

+64
-0
lines changed

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
language: rust
2+
3+
install:
4+
- bash ci/install.sh
5+
6+
script:
7+
- bash ci/script.sh
8+
9+
after_success:
10+
- bash ci/after-success.sh
11+
12+
branches:
13+
only:
14+
- master
15+
- staging
16+
- trying
17+
18+
notifications:
19+
email:
20+
on_success: never

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# The Embedonomicon
22

3+
> How to bootstrap support for a no_std target
4+
5+
This book is being temporarily hosted at https://rust-embedded.github.io/embedonomicon/
6+
37
## License
48

59
The Embedonomicon (this project) is distributed under the following licenses:

ci/after-success.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
set -euxo pipefail
2+
3+
main() {
4+
curl -Ls https://github.com/davisp/ghp-import/archive/master.tar.gz |
5+
tar --strip-components 1 -C ghp-import -xz
6+
7+
./ghp-import/ghp_import.py book
8+
9+
# NOTE(+x) don't print $GH_TOKEN to the console!
10+
set +x
11+
git push -fq https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git gh-pages && echo OK
12+
}
13+
14+
if [ $TRAVIS_BRANCH = master && $TRAVIS_PULL_REQUEST=false ]; then
15+
main
16+
fi

ci/install.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
set -euxo pipefail
2+
3+
main() {
4+
local tag=$(git ls-remote --tags --refs --exit-code https://github.com/rust-lang-nursery/mdbook \
5+
| cut -d/ -f3 \
6+
| grep -E '^v[0.1.0-9.]+$' \
7+
| sort --version-sort \
8+
| tail -n1)
9+
curl -LSfs https://japaric.github.io/trust/install.sh | \
10+
sh -s -- --git rust-lang-nursery/mdbook --tag $tag
11+
12+
pip install linkchecker --user
13+
}
14+
15+
main

ci/script.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
set -euxo pipefail
2+
3+
main() {
4+
mdbook build
5+
6+
linkchecker book
7+
}
8+
9+
main

0 commit comments

Comments
 (0)