forked from ANSSI-FR/rust-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
51 lines (47 loc) · 1.35 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
language: rust
cache: cargo
sudo: false
before_script:
- |
LATEST=$(cargo search mdbook | grep "^mdbook =" | cut -d '"' -f 2)
INSTALLED=$(cargo install --list | grep "^mdbook " | cut -d v -f 2 | tr -d :)
if [ "$INSTALLED" != "$LATEST" ]; then
if [ "$INSTALLED" != "" ]; then
echo "mdbook '$INSTALLED' is already installed"
fi
echo "Installing mdbook '$LATEST'"
cargo install mdbook --force --vers "$LATEST"
fi
LATEST=$(cargo search mdbook-checklist | grep "^mdbook-checklist =" | cut -d '"' -f 2)
INSTALLED=$(cargo install --list | grep "^mdbook-checklist " | cut -d v -f 2 | tr -d :)
if [ "$INSTALLED" != "$LATEST" ]; then
if [ "$INSTALLED" != "" ]; then
echo "mdbook-checklist '$INSTALLED' is already installed"
fi
echo "Installing mdbook-checklist '$LATEST'"
cargo install mdbook-checklist --force --vers "$LATEST"
fi
script:
- ./lang.sh fr
- mdbook clean
- mdbook build
- mdbook test
- ./lang.sh en
- mdbook clean
- mdbook build
- mdbook test
jobs:
include:
- stage: 'nightly'
rust: nightly
- stage: 'stable'
rust: stable
deploy:
provider: pages
target-branch: gh-pages
local-dir: book
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
on:
branch: master