<commit_before>#!/bin/bash

# This script uses Travis environment variables to check if the artifacts should be published.
#
# If the build is successful and the branch is `master`, script triggers the publishing process.
#
# Tests are skipped during the publishing, as the script should be executed after their execution.

echo " -- PUBLISHING: current branch is $TRAVIS_BRANCH."

if [ "$TRAVIS_TEST_RESULT" == 1 ]; then
    echo " ------ The build is broken. Publishing will not be performed."
    exit 0
fi

if [ "$TRAVIS_BRANCH" == 'master' ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
    echo " ------ Publishing is DISABLED for the current branch."
    exit 0
fi

echo " ------ Publishing the artifacts to the repository..."
./gradlew publish -x test
echo " ------ Artifacts published."

echo " -- PUBLISHING: completed."<commit_msg>Fix condition for artifacts publishing<commit_after>#!/bin/bash

# This script uses Travis environment variables to check if the artifacts should be published.
#
# If the build is successful and the branch is `master`, script triggers the publishing process.
#
# Tests are skipped during the publishing, as the script should be executed after their execution.

echo " -- PUBLISHING: current branch is $TRAVIS_BRANCH."

if [ "$TRAVIS_TEST_RESULT" == 1 ]; then
    echo " ------ The build is broken. Publishing will not be performed."
    exit 0
fi

if [ "$TRAVIS_BRANCH" != "master" ] || [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
    echo " ------ Publishing is DISABLED for the current branch."
    exit 0
fi

echo " ------ Publishing the artifacts to the repository..."
./gradlew publish -x test
echo " ------ Artifacts published."

echo " -- PUBLISHING: completed."
{'fraction_non_alphanumeric': 0.11974299065420561, 'fraction_numerical': 0.0035046728971962616, 'mean_word_length': 3.3367088607594937, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '7031227', 'n_tokens_mistral': 504, 'n_tokens_neox': 464, 'n_words': 207}