mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-27 14:04:56 +01:00
www: prefix latest docs with the minor version
This commit is contained in:
parent
8135ed4999
commit
2ffe12a0fc
1 changed files with 6 additions and 3 deletions
|
@ -2,6 +2,7 @@ set -euxo pipefail
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
local langs=( en ru )
|
local langs=( en ru )
|
||||||
|
local latest=0.5
|
||||||
local vers=( 0.4.3 )
|
local vers=( 0.4.3 )
|
||||||
|
|
||||||
rm -f .cargo/config
|
rm -f .cargo/config
|
||||||
|
@ -10,11 +11,13 @@ main() {
|
||||||
local td=$(mktemp -d)
|
local td=$(mktemp -d)
|
||||||
|
|
||||||
# build latest docs
|
# build latest docs
|
||||||
cp -r target/doc $td/api
|
mkdir $td/$latest
|
||||||
sed 's|URL|rtfm/index.html|g' redirect.html > $td/api/index.html
|
cp -r target/doc $td/$latest/api
|
||||||
|
sed 's|URL|rtfm/index.html|g' redirect.html > $td/$latest/api/index.html
|
||||||
|
|
||||||
mkdir $td/book/
|
mkdir $td/book/
|
||||||
sed 's|URL|book/en|g' redirect.html > $td/index.html
|
sed 's|URL|0.5|g' redirect.html > $td/index.html
|
||||||
|
sed 's|URL|book/en|g' redirect.html > $td/$latest/index.html
|
||||||
for lang in ${langs[@]}; do
|
for lang in ${langs[@]}; do
|
||||||
( cd book/$lang && mdbook build )
|
( cd book/$lang && mdbook build )
|
||||||
cp -r book/$lang/book $td/book/$lang
|
cp -r book/$lang/book $td/book/$lang
|
||||||
|
|
Loading…
Reference in a new issue