forked from collective/collective.developermanual
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc-holliday.sh
More file actions
executable file
·34 lines (27 loc) · 873 Bytes
/
doc-holliday.sh
File metadata and controls
executable file
·34 lines (27 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# Do a git pull on the docs, see if anything has changed.
# If so rebuild the docs (clean rebuild) and sync to the target.
# Must be run within the buildout directory.
#
#
deploy_target=/var/www/developer.plone.org/var/public_html
# http://stackoverflow.com/questions/3258243/git-check-if-pull-needed
git pull | grep -q -v 'Already up-to-date.' && changed=1
if [[ $@ == **force** ]] ; then
echo "Forcing update"
changed=1
fi
if [[ ! -z "$changed" ]] ; then
# Rebuild the docs from the scratch
bin/develop up
bin/buildout
make clean html
# Copy docs to the target in-place, so even if someone is reading
# the site there is no service interrupts
install -d $deploy_target
rsync -a --inplace build/html/* $deploy_target
echo "Copied docs to $deploy_target"
else
echo "Git was up to date - no docs built"
fi