<commit_before>#!/bin/bash

deploy_updates() {
    # Clone the gh-pages branch
    rm -rf out || true
    git clone -b gh-pages --single-branch https://github.com/mondo-project/mondo-hawk.git out
    cd out

    # Indicate clearly that this commit comes from Travis
    git config user.name "Travis CI"
    git config user.email "<EMAIL>"

    # If the tip comes from Travis, amend it. Otherwise, add a new commit.
    rm -rf hawk-updates
    cp -r ../releng/org.hawk.updatesite/target/repository hawk-updates
    git add --all .
    if git log --format=%an HEAD~.. | grep -q "Travis CI"; then
	COMMIT_FLAGS="--amend"
    fi
    git commit $COMMIT_FLAGS -am "Build update site"

    # Force push to the gh-pages branch
    git push --force "https://${GH_TOKEN}@${GH_REF}" gh-pages &>/dev/null
}

# Exit immediately if something goes wrong
set -o errexit

# Run the regular build
mvn --quiet install

# Only continue deploying to update site for non-PR commits to the master branch
if [[ "$TRAVIS_BRANCH" == 'master' && "$TRAVIS_PULL_REQUEST" == 'false' ]]; then
    deploy_updates
fi
<commit_msg>deploy.sh: upload cli/server products as well<commit_after>#!/bin/bash

deploy_updates() {
    # Clone the gh-pages branch
    rm -rf out || true
    git clone -b gh-pages --single-branch https://github.com/mondo-project/mondo-hawk.git out
    cd out

    # Indicate clearly that this commit comes from Travis
    git config user.name "<NAME>"
    git config user.email "<EMAIL>"

    # If the tip comes from Travis, amend it. Otherwise, add a new commit.
    rm -rf hawk-updates
    rm -rf hawk-products
    cp -r ../releng/org.hawk.updatesite/target/repository hawk-updates
    mkdir hawk-products
    cp ../releng/org.hawk.service.{cli,server}.product/target/products/*.zip hawk-products
    git add --all .
    if git log --format=%an HEAD~.. | grep -q "Travis CI"; then
	COMMIT_FLAGS="--amend"
    fi
    git commit $COMMIT_FLAGS -am "Build update site"

    # Force push to the gh-pages branch
    git push --force "https://${GH_TOKEN}@${GH_REF}" gh-pages &>/dev/null
}

# Exit immediately if something goes wrong
set -o errexit

# Run the regular build
mvn --quiet install

# Only continue deploying to update site for non-PR commits to the master branch
if [[ "$TRAVIS_BRANCH" == 'master' && "$TRAVIS_PULL_REQUEST" == 'false' ]]; then
    deploy_updates
fi

{'fraction_non_alphanumeric': 0.11986446421008047, 'fraction_numerical': 0.0, 'mean_word_length': 2.969747899159664, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 4, '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': '1934809', 'n_tokens_mistral': 817, 'n_tokens_neox': 773, 'n_words': 266}