Skip to content

Commit

Permalink
Update build script to print status updates
Browse files Browse the repository at this point in the history
  • Loading branch information
CensoredUsername committed Apr 12, 2017
1 parent 38cb37b commit cbbd7c5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
target/
build_docs/
Cargo.lock

testing/tests/bf_interpreter.rs
testing/tests/bf_jit.rs
testing/tests/hello_world.rs
18 changes: 10 additions & 8 deletions build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ set -o errexit

shopt -s globstar

# build individual documentation
echo "build individual documentation"
(cd plugin && cargo doc)
(cd runtime && cargo doc)

# remove old docs build
echo "remove old docs build"
rm -rf build_docs

# build directory structure
echo "build directory structure"
mkdir ./build_docs
mkdir ./build_docs/language
mkdir ./build_docs/plugin
mkdir ./build_docs/runtime

# create instruction reference markdown file
echo "create instruction reference markdown file"
(cd doc/insref && cargo update && cargo run > ../instructionref.md)

# build plugin docs
echo "build plugin docs"
for f in ./doc/*.md; do
rustdoc $f -o ./build_docs/language --markdown-no-toc --html-before-content=./doc/pre.html --html-after-content=./doc/post.html --markdown-css=./formatting.css
done
cp ./doc/formatting.css ./build_docs/language/formatting.css

# copy over the docs folders
echo "copy over the docs folders"
cp -r ./plugin/target/doc/* ./build_docs/plugin
cp -r ./runtime/target/doc/* ./build_docs/runtime

# hack in javascript
echo "insert javascript"
cat ./doc/hack.js >> ./build_docs/plugin/search-index.js
cat ./doc/hack.js >> ./build_docs/runtime/search-index.js

# copy docs examples to tests
echo "copy docs examples to tests"
declare -a examples=("bf-interpreter" "bf-jit" "hello-world")
for EX in "${examples[@]}"
do
Expand All @@ -45,7 +45,9 @@ do
done

if [ "$1" == "commit" ]; then
echo "cloning gh-pages into a temporary directory"
git clone --branch gh-pages --depth 1 "[email protected]:CensoredUsername/dynasm-rs.git" deploy_docs

cd deploy_docs
git config user.name "CensoredUsername"
git config user.email "[email protected]"
Expand Down

0 comments on commit cbbd7c5

Please sign in to comment.