source: ReferenceDesigns/w3_802.11/python/wlan_exp/docs/server-scripts/build-docs.sh

Last change on this file was 6320, checked in by chunter, 5 years ago

1.8.0 release wlan-exp

File size: 1.2 KB
RevLine 
[6320]1#!/bin/bash
2
3# IMPORTANT: this script runs as the post-receive hook on the support server wlan-exp repository
4#  If you modify this script you must commit/push twice - the first push will run the old script
5#  which update's the server's local working copy. The second push will run the new script
6
7BRANCH_TO_BUILD="support-docs"
8PYPATH_DIR="/var/www/wlan-docs/wlan-exp-doc-wd/"
9WD_DIR="/var/www/wlan-docs/wlan-exp-doc-wd/wlan_exp/docs" #sphinx dir
10
11export PYTHONPATH=$PYTHONPATH:$PYPATH_DIR
12# export BUILDING_DOCS_ON_SERVER=1 # support server has numpy, now required to generate entry type docs
13
14while read oldrev newrev ref
15do
16
17  branch_received=`echo $ref | cut -d/ -f3`
18
19  echo "**** Received [$branch_received] branch."
20
21  if [ $branch_received = $BRANCH_TO_BUILD ]; then
22    cd $WD_DIR
23    # Unset to use current working directory.
24    unset GIT_DIR
25
26    echo "**** Pulling changes."
27    git fetch --all
28    git reset --hard origin/$BRANCH_TO_BUILD
29
30    echo `date` > sphinx-build.log
31    echo `git log -n1` >> sphinx-build.log
32    echo "***********" >> sphinx-build.log
33
34    /usr/local/bin/sphinx-build -Ea -b html source build/html &>> sphinx-build.log
35
36    cp sphinx-build.log build/html
37
38  else
39    echo "**** Invalid branch, aborting."
40    exit 0
41
42  fi
43done
Note: See TracBrowser for help on using the repository browser.