Skip to content

Commit

Permalink
Make rust doc deterministic
Browse files Browse the repository at this point in the history
Avoid committing if there is no change compared to the previous version,
to keep history clean.

Ref project-oak#246
  • Loading branch information
tiziano88 committed Apr 20, 2020
1 parent bc98624 commit f54464d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_rust_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ jobs:
run: |
cd ./out
git add .
[[ -z "$(git status --porcelain)" ]] && (echo 'no changes to commit'; exit 0)
git commit --message="Update gh-pages from ${GITHUB_SHA}"
git push
3 changes: 3 additions & 0 deletions scripts/build_gh_pages
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ cargo doc --no-deps --target-dir="${TARGET_DIR}"
# Remove non-doc artifacts from the target dir.
rm --recursive --force "${TARGET_DIR}/debug"

# Remove non-deterministic files.
rm "{TARGET_DIR}/.rustc_info.json"

# The docs generated from the Cargo workspace do not include a workspace-level index, so we generate
# one here and redirect to the Oak SDK documentation.
cat <<-END > "${TARGET_DIR}/index.html"
Expand Down

0 comments on commit f54464d

Please sign in to comment.