Refactor build process

This commit is contained in:
Palash Tyagi 2025-08-03 23:23:10 +01:00
parent 1dcd9727b4
commit 3654c7053c
2 changed files with 17 additions and 11 deletions

View File

@ -1,15 +1,7 @@
#!/usr/bin/env sh #!/usr/bin/env sh
# Build and test the RustFrame user guide using mdBook. # Build and test the RustFrame user guide using mdBook.
set -e set -e
# Ensure the library is compiled so examples can link against it.
cargo clean cd docs
bash gen.sh "$@"
cargo build --manifest-path ../Cargo.toml cd ..
# Run embedded code examples as tests.
mdbook test -L ../target/debug/deps "$@"
# Finally, render the book.
mdbook build "$@"
cargo build
cargo build --release

14
docs/gen.sh Normal file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env sh
set -e
cargo clean
cargo build --manifest-path ../Cargo.toml
mdbook test -L ../target/debug/deps "$@"
mdbook build "$@"
cargo build
cargo build --release