mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-21 07:43:08 +02:00
Substitute usage information into the documentation
This will simplify keeping documentation in sync with the code.
This commit is contained in:
parent
7f046a8e27
commit
09558f9329
21 changed files with 1177 additions and 55 deletions
31
build-docs.sh
Executable file
31
build-docs.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#! /bin/bash
|
||||
|
||||
REMOTE=origin
|
||||
|
||||
set -e
|
||||
|
||||
if ! [ -f "docs/src/SUMMARY.md" ]; then
|
||||
echo "Run this from the root of the repo"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# build the latest version of the mdbook plugin
|
||||
cargo build -p taskchampion-cli --features usage-docs --bin usage-docs
|
||||
|
||||
# create a worktree of this repo, with the `gh-pages` branch checked out
|
||||
if ! [ -d ./docs/tmp ]; then
|
||||
git worktree add docs/tmp gh-pages
|
||||
fi
|
||||
|
||||
# update the wortree
|
||||
(cd docs/tmp && git pull $REMOTE gh-pages)
|
||||
|
||||
# remove all files in the worktree and regenerate the book there
|
||||
rm -rf docs/tmp/*
|
||||
mdbook build docs
|
||||
cp -rp docs/book/* docs/tmp
|
||||
|
||||
# add everything in the worktree, commit, and push
|
||||
(cd docs/tmp && git add -A)
|
||||
(cd docs/tmp && git commit -am "update docs")
|
||||
(cd docs/tmp && git push $REMOTE gh-pages:gh-pages)
|
Loading…
Add table
Add a link
Reference in a new issue