<commit_before>#!/bin/bash

DOCKER_TAG="latest"

if [ -n "${DOCKER_TAG}" ] && [ "${TRAVIS_GO_VERSION}" = "${GO_FOR_RELEASE}" ] && [ "${TRAVIS_BRANCH}" = "master" ]; then
	cat > ~/.dockercfg <<EOF
{
  "https://index.docker.io/v1/": {
    "auth": "${HUB_AUTH}",
    "email": "${HUB_EMAIL}"
  }
}
EOF
	docker build -t tsuru/api:${DOCKER_TAG} .
	docker push tsuru/api:${DOCKER_TAG}
else
	echo "No image to build"
fi
<commit_msg>travis: uses travis_tag to version hub image<commit_after>#!/bin/bash

DOCKER_TAG="latest"

if [ -n "$TRAVIS_TAG" ] && [[ "${TRAVIS_TAG}" =~ ([0-9]+). ]] && [[ $TRAVIS_TAG != *"rc"* ]]
then
    DOCKER_TAG=v${BASH_REMATCH[1]}
fi

if [ -n "${DOCKER_TAG}" ] && [ "${TRAVIS_GO_VERSION}" = "${GO_FOR_RELEASE}" ] && [ "${TRAVIS_BRANCH}" = "master" ]; then
	cat > ~/.dockercfg <<EOF
{
  "https://index.docker.io/v1/": {
    "auth": "${HUB_AUTH}",
    "email": "${HUB_EMAIL}"
  }
}
EOF
	echo "Pushing docker image to hub tagged as $DOCKER_TAG"
	docker build -t tsuru/api:${DOCKER_TAG} .
	docker push tsuru/api:${DOCKER_TAG}
else
	echo "No image to build"
fi

{'fraction_non_alphanumeric': 0.22625698324022347, 'fraction_numerical': 0.004655493482309125, 'mean_word_length': 4.143540669856459, 'pattern_counts': {'":': 6, '<': 7, '<?xml version=': 0, '>': 5, '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': '6585953', 'n_tokens_mistral': 487, 'n_tokens_neox': 469, 'n_words': 91}