aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-02-11 20:41:49 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-02-11 20:41:49 +0000
commit672886a67a80136f5620115772ceec1a628d8ee6 (patch)
tree98361d6d3dfced4b068771c31163b324573294b7 /ci
parent1d52964df7abf9fba09933470d5c3dcce96760c4 (diff)
parent0007a35a274ab2d07eb937e41971ea5e2c1cb5ff (diff)
Merge #139
139: russian translation r=japaric a=japaric Co-authored-by: Jorge Aparicio <jorge@japaric.io> Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
Diffstat (limited to 'ci')
-rw-r--r--ci/after-success.sh11
-rw-r--r--ci/script.sh15
2 files changed, 21 insertions, 5 deletions
diff --git a/ci/after-success.sh b/ci/after-success.sh
index f9f2522..04376d6 100644
--- a/ci/after-success.sh
+++ b/ci/after-success.sh
@@ -4,10 +4,12 @@ main() {
rm -f .cargo/config
cargo doc --features timer-queue
( cd book && mdbook build )
+ ( cd ru && mdbook build )
local td=$(mktemp -d)
cp -r target/doc $td/api
cp -r book/book $td/
+ cp -r ru/book $td/book/ru
cp LICENSE-* $td/book/
mkdir ghp-import
@@ -22,6 +24,15 @@ main() {
rm -rf $td
}
+# fake Travis variables to be able to run this on a local machine
+if [ -z ${TRAVIS_BRANCH-} ]; then
+ TRAVIS_BRANCH=master
+fi
+
+if [ -z ${TRAVIS_PULL_REQUEST-} ]; then
+ TRAVIS_PULL_REQUEST=false
+fi
+
if [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ]; then
main
fi
diff --git a/ci/script.sh b/ci/script.sh
index 3dd60de..645db3a 100644
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -23,14 +23,19 @@ main() {
else
cargo doc
fi
- ( cd book && mdbook build )
+ ( cd book/en && mdbook build )
+ ( cd book/ru && mdbook build )
local td=$(mktemp -d)
cp -r target/doc $td/api
- cp -r book/book $td/
- cp LICENSE-* $td/book/
-
- linkchecker $td/book/
+ mkdir $td/book
+ cp -r book/en/book $td/book/en
+ cp -r book/ru/book $td/book/ru
+ cp LICENSE-* $td/book/en
+ cp LICENSE-* $td/book/ru
+
+ linkchecker $td/book/en/
+ linkchecker $td/book/ru/
linkchecker $td/api/rtfm/
linkchecker $td/api/cortex_m_rtfm_macros/
fi