<commit_before>#!/bin/bash -e

GH_REF=github.com/killbill/killbill-docs.git
BUILD=`mktemp -d "${TMPDIR:-/tmp}"/foo.XXXX`

cp -r build $BUILD

pushd $BUILD
git clone --depth=5 --branch=gh-pages git://$GH_REF
popd

mv -f $BUILD/build/selfcontained/* $BUILD/killbill-docs/latest/

pushd $BUILD/killbill-docs
git config user.name "Travis-CI"
git config user.email "<EMAIL>"
git add `readlink latest`
git commit -m "Docs update"
git push -fq "https://${GH_TOKEN}@${GH_REF}" gh-pages:gh-pages > /dev/null 2>&1
popd<commit_msg>update_gh-pages.sh: add latest subdirectory<commit_after>#!/bin/bash -e

GH_REF=github.com/killbill/killbill-docs.git
BUILD=`mktemp -d "${TMPDIR:-/tmp}"/foo.XXXX`

cp -r build $BUILD

pushd $BUILD
git clone --depth=5 --branch=gh-pages git://$GH_REF
popd

VERSION=$(cat $BUILD/killbill-docs/latest.txt)
mkdir -p $BUILD/killbill-docs/$VERSION
mkdir -p $BUILD/killbill-docs/latest
cp -f $BUILD/build/selfcontained/* $BUILD/killbill-docs/$VERSION/
cp -f $BUILD/build/selfcontained/* $BUILD/killbill-docs/latest/

pushd $BUILD/killbill-docs
git config user.name "Travis-CI"
git config user.email "<EMAIL>"
git add $VERSION
git add latest
git commit -m "Docs update"
git push -fq "https://${GH_TOKEN}@${GH_REF}" gh-pages:gh-pages > /dev/null 2>&1
popd
{'fraction_non_alphanumeric': 0.1707509881422925, 'fraction_numerical': 0.0047430830039525695, 'mean_word_length': 4.456896551724138, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '5788146', 'n_tokens_mistral': 516, 'n_tokens_neox': 484, 'n_words': 114}