<commit_before>#!/usr/bin/env bash
set -e

if [[ "${TRAVIS_PULL_REQUEST}" = "false" ]]; then
    echo "Publishing..."
else
    echo "Skipping publishing"
    exit 0
fi

docker login -u $DOCKER_USER -p $DOCKER_PASS

BASE_NAMES=(pebble pebble-challtestsrv)
for BASE_NAME in ${BASE_NAMES[@]}; do
    IMAGE_NAME="letsencrypt/${BASE_NAME}"

    echo "Updating docker ${IMAGE_NAME} image..."

    # create docker image
    docker build -t ${IMAGE_NAME}:temp -f docker/${BASE_NAME}/Dockerfile .

    # push images
    if [[ -n "${TRAVIS_TAG}" ]]; then
        echo "Try to publish image: ${IMAGE_NAME}:${TRAVIS_TAG}"
        docker tag ${IMAGE_NAME}:temp ${IMAGE_NAME}:${TRAVIS_TAG}
        docker push ${IMAGE_NAME}:${TRAVIS_TAG}

        echo "Try to publish image: ${IMAGE_NAME}:latest"
        docker tag ${IMAGE_NAME}:${TRAVIS_TAG} ${IMAGE_NAME}:latest
        docker push ${IMAGE_NAME}:latest
    fi
done

echo "Published"<commit_msg>CI: Publish script tweaks (#197)<commit_after>#!/usr/bin/env bash
set -e

if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
    echo "Publishing..."
else
    echo "Skipping publishing"
    exit 0
fi

docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"

BASE_NAMES=(pebble pebble-challtestsrv)
for BASE_NAME in "${BASE_NAMES[@]}"; do
    IMAGE_NAME="letsencrypt/${BASE_NAME}"

    echo "Updating docker ${IMAGE_NAME} image..."

    # create docker image
    docker build -t "${IMAGE_NAME}:temp" -f "docker/${BASE_NAME}/Dockerfile" .

    # push images
    if [ -n "${TRAVIS_TAG}" ]; then
        echo "Try to publish image: ${IMAGE_NAME}:${TRAVIS_TAG}"
        docker tag "${IMAGE_NAME}:temp" "${IMAGE_NAME}:${TRAVIS_TAG}"
        docker push "${IMAGE_NAME}:${TRAVIS_TAG}"

        echo "Try to publish image: ${IMAGE_NAME}:latest"
        docker tag "${IMAGE_NAME}:${TRAVIS_TAG}" "${IMAGE_NAME}:latest"
        docker push "${IMAGE_NAME}:latest"
    fi
done

echo "Published"

{'fraction_non_alphanumeric': 0.15441176470588236, 'fraction_numerical': 0.0026260504201680674, 'mean_word_length': 3.601449275362319, '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': '610684', 'n_tokens_mistral': 689, 'n_tokens_neox': 655, 'n_words': 165}