<commit_before>#!/bin/bash
echo "CIRCLE_BRANCH: ${CIRCLE_BRANCH}"
echo "CI_PULL_REQUESTS: ${CI_PULL_REQUESTS}"
if [ ${CIRCLE_BRANCH} = "master" ] || [ ${CIRCLE_BRANCH} = "staging" ] || [ -z ${CI_PULL_REQUESTS} ]; then
	SERVICE_NAME="`cat package.json | grep -m 1 name | cut -d '"' -f 4`"
	IMAGE_TAG=$1
	$(aws ecr get-login --region eu-west-1  --no-include-email)

	docker build -t ${SERVICE_NAME} .
	docker tag ${SERVICE_NAME} ${AWS_ACCOUNT_ID}.dkr.ecr.eu-west-1.amazonaws.com/${SERVICE_NAME}:${IMAGE_TAG}
	docker push ${AWS_ACCOUNT_ID}.dkr.ecr.eu-west-1.amazonaws.com/${SERVICE_NAME}:${IMAGE_TAG}
fi<commit_msg>Adding Image Tag variable<commit_after>#!/bin/bash
echo "CIRCLE_BRANCH: ${CIRCLE_BRANCH}"
echo "CI_PULL_REQUEST: ${CI_PULL_REQUEST}"
if [ ${CIRCLE_BRANCH} = "master" ] || [ ${CIRCLE_BRANCH} = "staging" ] || [ -z ${CI_PULL_REQUEST} ]; then
	SERVICE_NAME="`cat package.json | grep -m 1 name | cut -d '"' -f 4`"
	IMAGE_TAG=${CI_PULL_REQUEST}:-${CIRCLE_BRANCH}
	$(aws ecr get-login --region eu-west-1  --no-include-email)

	docker build -t ${SERVICE_NAME} .
	docker tag ${SERVICE_NAME} ${AWS_ACCOUNT_ID}.dkr.ecr.eu-west-1.amazonaws.com/${SERVICE_NAME}:${IMAGE_TAG}
	docker push ${AWS_ACCOUNT_ID}.dkr.ecr.eu-west-1.amazonaws.com/${SERVICE_NAME}:${IMAGE_TAG}
fi
{'fraction_non_alphanumeric': 0.19179163378058406, 'fraction_numerical': 0.008681925808997633, 'mean_word_length': 5.246305418719212, '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': '4374036', 'n_tokens_mistral': 548, 'n_tokens_neox': 546, 'n_words': 90}