From c8197f524e349de8a6497c6cba00b57189bb5c3e Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 15 Sep 2019 20:19:48 +0200 Subject: [PATCH] fix gh-pages build --- Cargo.toml | 6 +++--- ci/after-success.sh | 31 +++++++++++++++++++++++++++---- macros/Cargo.toml | 6 +++--- macros/src/lib.rs | 4 ++-- redirect.html | 6 +++--- 5 files changed, 38 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1449d6ef53..d1ca31661d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,13 +5,13 @@ authors = [ ] categories = ["concurrency", "embedded", "no-std"] description = "Real Time For the Masses (RTFM): a concurrency framework for building real time systems" -documentation = "https://japaric.github.io/cortex-m-rtfm/book/en" +documentation = "https://rtfm-rs.github.io/cortex-m-rtfm/book/en" edition = "2018" keywords = ["arm", "cortex-m"] license = "MIT OR Apache-2.0" name = "cortex-m-rtfm" readme = "README.md" -repository = "https://github.com/japaric/cortex-m-rtfm" +repository = "https://github.com/rtfm-rs/cortex-m-rtfm" version = "0.5.0-beta.1" [lib] @@ -48,7 +48,7 @@ required-features = ["__v7"] [dependencies] cortex-m = "0.6.0" cortex-m-rtfm-macros = { path = "macros" } -rtfm-core = { git = "https://github.com/japaric/rtfm-core" } +rtfm-core = { git = "https://github.com/rtfm-rs/rtfm-core" } cortex-m-rt = "0.6.9" heapless = "0.5.0" diff --git a/ci/after-success.sh b/ci/after-success.sh index 6c69693795..3aaa8348f3 100644 --- a/ci/after-success.sh +++ b/ci/after-success.sh @@ -2,20 +2,44 @@ set -euxo pipefail main() { local langs=( en ru ) + local vers=( 0.4.3 ) rm -f .cargo/config - cargo doc --features timer-queue + cargo doc local td=$(mktemp -d) + + # build latest docs cp -r target/doc $td/api mkdir $td/book/ - cp redirect.html $td/book/index.html + cp redirect.html $td/index.html for lang in ${langs[@]}; do ( cd book/$lang && mdbook build ) cp -r book/$lang/book $td/book/$lang cp LICENSE-* $td/book/$lang/ done + # build older docs + for ver in ${vers[@]}; do + local prefix=${ver%.*} + + mkdir -p $td/$prefix/book + local src=$(mktemp -d) + curl -L https://github.com/rtfm-rs/cortex-m-rtfm/archive/v${ver}.tar.gz | tar xz --strip-components 1 -C $src + + pushd $src + cargo doc || cargo doc --features timer-queue + cp -r target/doc $td/$prefix/api + for lang in ${langs[@]}; do + ( cd book/$lang && mdbook build ) + cp -r book/$lang/book $td/$prefix/book/$lang + cp LICENSE-* $td/$prefix/book/$lang/ + done + popd + + rm -rf $src + done + mkdir ghp-import curl -Ls https://github.com/davisp/ghp-import/archive/master.tar.gz | tar --strip-components 1 -C ghp-import -xz @@ -23,8 +47,7 @@ main() { ./ghp-import/ghp_import.py $td set +x - # NOTE push documentation to a different repository - git push -fq https://$GH_TOKEN@github.com/japaric/rtfm5.git gh-pages && echo OK + git push -fq https://$GH_TOKEN@github.com/rtfm-rs/cortex-m-rtfm.git gh-pages && echo OK rm -rf $td } diff --git a/macros/Cargo.toml b/macros/Cargo.toml index ed7626f84e..c7cce5257e 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -2,13 +2,13 @@ authors = ["Jorge Aparicio "] categories = ["concurrency", "embedded", "no-std"] description = "Procedural macros of the cortex-m-rtfm crate" -documentation = "https://japaric.github.io/cortex-m-rtfm/api/cortex_m_rtfm" +documentation = "https://rtfm-rs.github.io/cortex-m-rtfm/api/cortex_m_rtfm" edition = "2018" keywords = ["arm", "cortex-m"] license = "MIT OR Apache-2.0" name = "cortex-m-rtfm-macros" readme = "../README.md" -repository = "https://github.com/japaric/cortex-m-rtfm" +repository = "https://github.com/rtfm-rs/cortex-m-rtfm" version = "0.5.0-alpha.1" [lib] @@ -20,7 +20,7 @@ quote = "1" syn = "1" [dependencies.rtfm-syntax] -git = "https://github.com/japaric/rtfm-syntax" +git = "https://github.com/rtfm-rs/rtfm-syntax" [features] heterogeneous = [] diff --git a/macros/src/lib.rs b/macros/src/lib.rs index fdde5c6933..54282e1ec8 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -89,9 +89,9 @@ mod tests; /// /// - `resources: ::Resources`. A `struct` that contains all the resources that can be /// accessed from this context. Each field is a different resource; each resource may appear as a -/// reference (`&[mut]-`) or as proxy structure that implements the [`rftm::Mutex`] trait. +/// reference (`&[mut]-`) or as proxy structure that implements the [`rftm::Mutex`][rtfm-mutex] trait. /// -/// [`rtfm::Mutex`]: ../rtfm/trait.Mutex.html +/// [rtfm-mutex]: ../rtfm/trait.Mutex.html /// /// - `schedule: ::Schedule`. A `struct` that can be used to schedule *software* tasks. /// diff --git a/redirect.html b/redirect.html index c42694b4bf..58f1a72f22 100644 --- a/redirect.html +++ b/redirect.html @@ -3,14 +3,14 @@ - + Page Redirection - If you are not redirected automatically, follow this link to example. + If you are not redirected automatically, follow this link to example.