<commit_before>#!/bin/bash

set -e
set -x 
export JAVA_HOME=/usr/lib/jvm/java-8-oracle

EXIST_NIGHTLY_SRC=/usr/local/exist-nightly-build
EXIST_NIGHTLY_DEST=/www-data/static.adamretter.org.uk/exist-nightly

if [ ! -d "$EXIST_NIGHTLY_SRC" ]; then
	mkdir -p $EXIST_NIGHTLY_SRC
	git clone https://github.com/exist-db/exist.git $EXIST_NIGHTLY_SRC
fi

cd $EXIST_NIGHTLY_SRC
./build.sh clean
rm -rf $EXIST_NIGHTLY_SRC/extensions/modules/lib

# ignore any jars which were previously modified due to signing
git checkout -- lib/

## stash can be used if we have any build changes locally
# git stash save "local build fixes"
git fetch origin
git rebase origin/develop
# git stash pop

./build.sh jnlp-unsign-all all jnlp-sign-exist jnlp-sign-core
./build.sh installer installer-exe app
mv -v installer/eXist-db-setup-*.jar installer/eXist-db-setup-*.exe dist/eXist-db-*.dmg $EXIST_NIGHTLY_DEST

## cleanup any nightly builds (.dmg, .exe, .jar files) that are older than 2 months
find $EXIST_NIGHTLY_DEST -mtime +62 -type f \( -iname "*.exe" -or -iname "*.dmg" -or -iname "*.jar" \) -exec rm {} \;

## generate HTML page
cp index.html $EXIST_NIGHTLY_DEST
python generateHTML.py $EXIST_NIGHTLY_DEST<commit_msg>Ensure that the HTML page generation uses the correct paths<commit_after>#!/bin/bash

set -e
set -x 

pushd `dirname $0` > /dev/null
SCRIPTPATH=`pwd -P`
popd > /dev/null

export JAVA_HOME=/usr/lib/jvm/java-8-oracle

EXIST_NIGHTLY_SRC=/usr/local/exist-nightly-build
EXIST_NIGHTLY_DEST=/www-data/static.adamretter.org.uk/exist-nightly

if [ ! -d "$EXIST_NIGHTLY_SRC" ]; then
	mkdir -p $EXIST_NIGHTLY_SRC
	git clone https://github.com/exist-db/exist.git $EXIST_NIGHTLY_SRC
fi

cd $EXIST_NIGHTLY_SRC
./build.sh clean
rm -rf $EXIST_NIGHTLY_SRC/extensions/modules/lib

# ignore any jars which were previously modified due to signing
git checkout -- lib/

## stash can be used if we have any build changes locally
# git stash save "local build fixes"
git fetch origin
git rebase origin/develop
# git stash pop

./build.sh jnlp-unsign-all all jnlp-sign-exist jnlp-sign-core
./build.sh installer installer-exe app
mv -v installer/eXist-db-setup-*.jar installer/eXist-db-setup-*.exe dist/eXist-db-*.dmg $EXIST_NIGHTLY_DEST

## cleanup any nightly builds (.dmg, .exe, .jar files) that are older than 2 months
find $EXIST_NIGHTLY_DEST -mtime +62 -type f \( -iname "*.exe" -or -iname "*.dmg" -or -iname "*.jar" \) -exec rm {} \;

## generate HTML page
cp -v "${SCRIPTPATH}/index.html" $EXIST_NIGHTLY_DEST
python "${SCRIPTPATH}/generateHTML.py" $EXIST_NIGHTLY_DEST
{'fraction_non_alphanumeric': 0.12553942722636327, 'fraction_numerical': 0.003530796390741467, 'mean_word_length': 4.069582504970179, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4500478', 'n_tokens_mistral': 1020, 'n_tokens_neox': 975, 'n_words': 259}