forked from ome/omero-documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen_omero.sh
executable file
·65 lines (56 loc) · 1.56 KB
/
autogen_omero.sh
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env bash
set -e
set -u
set -x
# TODO
echo no linkcheck
# from the sub-script
export SUFFIX=${SUFFIX:-}
export WORKSPACE=${WORKSPACE:-$(pwd)}
export WORKSPACE=${WORKSPACE%/} # Remove trailing slashes
export USER=${USER:-$(whoami)}
export OMERODIR=${WORKSPACE}/OMERO.server$SUFFIX
export DOCVENV=${DOCVENV:-$WORKSPACE/.venv3}
export PYTHON=${PYTHON:-python}
export BUILD=${BUILD:-true}
# VARIABLES #1
MESSAGE="Update auto-generated documentation"
PUSH_COMMAND="update-submodules develop --no-ask --push develop/latest/autogen"
OPEN_PR=false
export SPHINXOPTS=-W
# Responsibilities of caller, likely omero-docs-superbuild
test -e $WORKSPACE/OMERO.server
test -e $WORKSPACE/omero-install
test -e $WORKSPACE/omeroweb-install
if [ ! -e $DOCVENV ]; then
$PYTHON -m venv $DOCVENV
echo You may need to manually install zeroc-ice
fi
WORKSPACE=$WORKSPACE SUFFIX=$SUFFIX omero/autogen_docs
# OSX compatibility for testing
if [ $BUILD == "true" ]; then
MD5SUM=md5sum
type $MD5SUM || MD5SUM=md5
SHA1SUM=sha1sum
type $SHA1SUM || SHA1SUM=shasum
cd omero
run_ant(){
ant "$@" -Dsphinx.opts="$SPHINXOPTS" -Domero.release="$OMERO_RELEASE"
}
run_ant clean html
echo "Order deny,allow
Deny from all
Allow from 134.36
Allow from 10
Satisfy Any" > _build/.htaccess
run_ant zip
for x in $WORKSPACE/ome-documentation/omero/_build/*.zip
do
base=`basename $x`
dir=`dirname $x`
pushd "$dir"
$MD5SUM "$base" >> "$base.md5"
$SHA1SUM "$base" >> "$base.sha1"
popd
done
fi