-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2035 from joshmoore/merge-build
Merge build
- Loading branch information
Showing
4 changed files
with
101 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
venv | ||
.DS_Store | ||
*.pyc | ||
OMERO.server* | ||
omero-install | ||
omeroweb-install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
set -u | ||
set -x | ||
|
||
# TODO | ||
echo no linkcheck | ||
|
||
# from the sub-script | ||
export WORKSPACE=${WORKSPACE:-$(pwd)} | ||
export USER=${USER:-$(whoami)} | ||
export OMERODIR=${WORKSPACE}/OMERO.server | ||
|
||
# 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 $WORKSPACE/venv ]; then | ||
rm -rf $WORKSPACE/venv | ||
fi | ||
python3 -m venv --system-site-packages $WORKSPACE/venv || virtualenv --system-site-packages $WORKSPACE/venv | ||
$WORKSPACE/venv/bin/pip install -r $WORKSPACE/OMERO.server/share/web/requirements-py27.txt | ||
$WORKSPACE/venv/bin/pip install future 'ansible<2.7' | ||
$WORKSPACE/venv/bin/pip install -U PyYAML==5.1 | ||
$WORKSPACE/venv/bin/pip install scc | ||
set +u # PS1 issue | ||
. $WORKSPACE/venv/bin/activate | ||
set -u | ||
export PATH=$WORKSPACE/OMERO.server/bin:$PATH:$HOME/.local/bin | ||
export PYTHONPATH=$WORKSPACE/OMERO.server/lib/python | ||
|
||
cd $WORKSPACE/ome-documentation/ | ||
omero/autogen_docs | ||
|
||
if [[ -z $(git status -s) ]]; then | ||
echo "No local changes" | ||
else | ||
git add . | ||
if [ "$OPEN_PR" = "true" ]; then | ||
scc $PUSH_COMMAND -m "$MESSAGE" | ||
else | ||
scc $PUSH_COMMAND --no-pr -m "$MESSAGE" | ||
fi | ||
fi | ||
|
||
# OSX compatibility for testing | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters