Skript na automatické buildy dokumentace různých větví / commitů
This commit is contained in:
parent
c8b54eab16
commit
4366780069
1 changed files with 22 additions and 0 deletions
22
mkdocs.sh
Executable file
22
mkdocs.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
commit="$(git rev-parse "$1^{commit}")"
|
||||
|
||||
tmp="$(mktemp --directory)"
|
||||
trap "rm -rvf \"$tmp\"" EXIT
|
||||
|
||||
# c-o
|
||||
git worktree add "$tmp" "$commit"
|
||||
trap "git worktree remove \"$tmp\"" EXIT
|
||||
cd "$tmp"
|
||||
|
||||
# make
|
||||
cd docs
|
||||
make html
|
||||
|
||||
# rsync
|
||||
rsync -raAXP _build/html/ "Gimli:WWW/mwd/$commit/"
|
||||
ssh Gimli "chmod -R o+rX WWW/mwd/$commit"
|
||||
|
||||
echo Done.
|
Loading…
Reference in a new issue