<commit_before>#!/bin/bash -e
# do not enable verbosity as the PACKAGECLOUD_TOKEN will be visible

DISTRO=${TAG%-*}
MARCH=${TAG#*-}

if [ "${CMD}" = "run_tests" ]; then
    exit 0
fi

# skip .deb package upload when:
# - tests fail
# - building a PR
# - no packagecloude.io account configured
# - not building .debs
# - not building the configured $DEPLOY_BRANCH
if [ "${TRAVIS_TEST_RESULT}" -eq 0 ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] \
        && [ ! -z ${PACKAGECLOUD_USER+x} ] && [ ! -z ${PACKAGECLOUD_TOKEN+x} ] \
        && [ "${CMD}" = "build_deb" ] \
        && [ "${TRAVIS_BRANCH}" == "${DEPLOY_BRANCH:-master}" ]; then
    PACKAGECLOUD_REPO=${PACKAGECLOUD_REPO:-machinekit}
    repo=${PACKAGECLOUD_USER}/${PACKAGECLOUD_REPO}/debian/${DISTRO}

    # delete extra debs as packagecloud fails if the same files
    # have already been uploaded
    if [ "${FLAV}" == "rt_preempt" ] || [ "${FLAV}" == "xenomai" ]; then
        rm -f ${TRAVIS_BUILD_DIR}/deploy/machinekit_*
        rm -f ${TRAVIS_BUILD_DIR}/deploy/machinekit-dev*
    fi

    package_cloud push ${repo} ${TRAVIS_BUILD_DIR}/deploy/*deb
    if [ "${MARCH}" = "64" ]; then
        package_cloud push ${repo} ${TRAVIS_BUILD_DIR}/deploy/*dsc
    fi
fi    
<commit_msg>Update upload_packagecloud.sh<commit_after>#!/bin/bash -e
# do not enable verbosity as the PACKAGECLOUD_TOKEN will be visible

DISTRO=${TAG%-*}
MARCH=${TAG#*-}

if [ "${CMD}" = "run_tests" ]; then
    exit 0
fi

# skip .deb package upload when:
# - tests fail
# - building a PR
# - no packagecloude.io account configured
# - not building .debs
# - not building the configured $DEPLOY_BRANCH
if [ "${TRAVIS_TEST_RESULT}" -eq 0 ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] \
        && [ ! -z ${PACKAGECLOUD_USER+x} ] && [ ! -z ${PACKAGECLOUD_TOKEN+x} ] \
        && [ "${CMD}" = "build_deb" ] \
        && [ "${TRAVIS_BRANCH}" == "${DEPLOY_BRANCH:-master}" ]; then
    PACKAGECLOUD_REPO=${PACKAGECLOUD_REPO:-machinekit}
    repo=${PACKAGECLOUD_USER}/${PACKAGECLOUD_REPO}/debian/${DISTRO}

    # delete extra debs as packagecloud fails if the same files
    # have already been uploaded
    if [ "${FLAV}" == "rt_preempt" ] || [ "${FLAV}" == "xenomai" ]; then
        rm -f ${TRAVIS_BUILD_DIR}/deploy/machinekit_*
        rm -f ${TRAVIS_BUILD_DIR}/deploy/machinekit-dev*
    fi

    package_cloud push ${repo} ${TRAVIS_BUILD_DIR}/deploy/*deb
    if [ "${MARCH}" = "64" ]; then
        package_cloud push ${repo} ${TRAVIS_BUILD_DIR}/deploy/*dsc
    fi
else
    echo "Package upload skipped"
fi    

{'fraction_non_alphanumeric': 0.17015396762731938, 'fraction_numerical': 0.0031583103039873666, 'mean_word_length': 3.3539518900343643, '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': '641584', 'n_tokens_mistral': 950, 'n_tokens_neox': 926, 'n_words': 208}