fix redirects and CNAME

This commit is contained in:
Jorge Aparicio 2019-09-15 21:40:40 +02:00
parent c14f7d1ce9
commit a593e49a3e
2 changed files with 11 additions and 4 deletions

View file

@ -11,8 +11,10 @@ main() {
# build latest docs
cp -r target/doc $td/api
sed 's|URL|rtfm/index.html|g' redirect.html > $td/api/index.html
mkdir $td/book/
cp redirect.html $td/index.html
sed 's|URL|book/en|g' redirect.html > $td/index.html
for lang in ${langs[@]}; do
( cd book/$lang && mdbook build )
cp -r book/$lang/book $td/book/$lang
@ -30,16 +32,21 @@ main() {
pushd $src
cargo doc || cargo doc --features timer-queue
cp -r target/doc $td/$prefix/api
sed 's|URL|rtfm/index.html|g' redirect.html > $td/$prefix/api/index.html
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
sed 's|URL|book/en|g' redirect.html > $td/$prefix/index.html
popd
rm -rf $src
done
# forward CNAME file
cp CNAME $td/
mkdir ghp-import
curl -Ls https://github.com/davisp/ghp-import/archive/master.tar.gz |
tar --strip-components 1 -C ghp-import -xz