-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Generate documentation and commit into the gh-pages branch. | ||
|
||
set -euo pipefail | ||
|
||
VERSION=$(grep -w version -m 1 Cargo.toml) | ||
COMMIT=$(git rev-parse HEAD) | ||
|
||
rustup default nightly | ||
cargo doc | ||
git worktree add doc gh-pages | ||
cd doc | ||
git rm -r . | ||
git reset HEAD .gitignore index.html | ||
git checkout -- .gitignore index.html | ||
mv ../target/doc/qrcode . | ||
mv ../target/doc/*.{txt,woff,js,css} . | ||
mkdir src | ||
mv ../target/doc/src/qrcode src | ||
git add . | ||
git commit -m "Update doc for ${VERSION} (${COMMIT})" | ||
cd .. | ||
rm -rf doc | ||
git worktree prune | ||
|