<commit_before>#!/usr/bin/env bash

IP="$(curl -s icanhazip.com)"

echo "Received IP = $IP, deplying to $1"

if [[ "$1" == "development" ]]; then
	echo "Adding IP to EC2"
	aws ec2 authorize-security-group-ingress --group-id $STAGING_SEC_GROUP --protocol tcp --port 22 --cidr "$IP/32"
	sleep 2
	echo "Running play to update Microsites and Assets"
  
  ssh ubuntu@192.168.3.11 "sudo apt-get -y install  git"
  ssh ubuntu@192.168.3.11 "sudo rm -r /edx/app/edxapp/circleci_builds && sudo mkdir -p /edx/app/edxapp && cd /edx/app/edxapp && sudo git clone https://github.com/proversity-org/circleci_builds.git"
  ssh ubuntu@192.168.3.11 "cd /edx/app/edxapp/circleci_builds && sudo /bin/bash run_build.sh development"

	ERROR=$?
	sleep 2
	echo "Removing IP from EC2"
	aws ec2 revoke-security-group-ingress --group-id $STAGING_SEC_GROUP --protocol tcp --port 22 --cidr "$IP/32"
fi


if [ "$ERROR" -eq 0 ];
then
    echo "Updated!"
	exit 0
else
    echo "Update failed!"
	exit 1
fi<commit_msg>TRY: new build hack try three<commit_after>#!/usr/bin/env bash

IP="$(curl -s icanhazip.com)"

echo "Received IP = $IP, deplying to $1"

if [[ "$1" == "development" ]]; then
	echo "Adding IP to EC2"
	aws ec2 authorize-security-group-ingress --group-id $STAGING_SEC_GROUP --protocol tcp --port 22 --cidr "$IP/32"
	sleep 2
	echo "Running play to update Microsites and Assets"
  
  ssh ubuntu@192.168.3.11 "sudo apt-get -y install  git"
  ssh ubuntu@192.168.3.11 "sudo rm -r /edx/app/edxapp/circleci_builds && sudo mkdir -p /edx/app/edxapp && cd /edx/app/edxapp && sudo git clone https://github.com/proversity-org/circleci_builds.git"
  ssh ubuntu@192.168.3.11 "cd /edx/app/edxapp/circleci_builds && sudo /bin/bash run_build.sh development"

	ERROR=$?
	sleep 2
	echo "Removing IP from EC2"
	aws ec2 revoke-security-group-ingress --group-id $STAGING_SEC_GROUP --protocol tcp --port 22 --cidr "$IP/32"
fi


if [[ "$ERROR" -eq 0 ]]; then
  echo "Updated!"
	exit 0
else
  echo "Update failed!"
	exit 1
fi
{'fraction_non_alphanumeric': 0.147979797979798, 'fraction_numerical': 0.046464646464646465, 'mean_word_length': 3.4617117117117115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '4767937', 'n_tokens_mistral': 865, 'n_tokens_neox': 764, 'n_words': 222}