Fixup installer generation

The installer pages need to be postprocessed a bit to have the latest
version on them, so this updates them to ensure that we're shipping the
postprocessed version at `/installer` instead of the raw versions
master
Alex Crichton 7 years ago
parent 6ed5b00f5b
commit 84b1a769ca
  1. 1
      .gitignore
  2. 2
      .travis.yml
  3. 12
      docs/_installer/build-installer.rs
  4. 0
      docs/_installer/index.html
  5. 0
      docs/_installer/init.sh
  6. 0
      docs/_installer/wasm-pack.js

1
.gitignore vendored

@ -5,3 +5,4 @@ tests/bin
wasm-pack.log
/build-installer
docs/book
docs/installer

@ -60,7 +60,7 @@ matrix:
- cargo install-update -a
script:
- (cd docs && mdbook build)
- rustc ./docs/installer/build-installer.rs
- rustc ./docs/_installer/build-installer.rs
- ./build-installer
deploy:
provider: pages

@ -1,20 +1,20 @@
use std::fs;
fn main() {
fs::create_dir_all("docs/book/installer").unwrap();
fs::create_dir_all("docs/installer").unwrap();
fs::copy(
"docs/_installer/wasm-pack.js",
"docs/installer/wasm-pack.js",
"docs/book/installer/wasm-pack.js",
).unwrap();
let index = fs::read_to_string("docs/installer/index.html").unwrap();
let index = fs::read_to_string("docs/_installer/index.html").unwrap();
fs::write(
"docs/book/installer/index.html",
"docs/installer/index.html",
fixup(&index),
).unwrap();
let init = fs::read_to_string("docs/installer/init.sh").unwrap();
let init = fs::read_to_string("docs/_installer/init.sh").unwrap();
fs::write(
"docs/book/installer/init.sh",
"docs/installer/init.sh",
fixup(&init),
).unwrap();
}
Loading…
Cancel
Save