<commit_before>#!/bin/bash

set -e

mkdir -p ~/.aws

rm -rf ~/.aws/*

echo "[default]" >> ~/.aws/config
echo "region=$REGION" >> ~/.aws/config
echo "role_arn=$ROLE_ARN" >> ~/.aws/config
echo "source_profile=builder" >> ~/.aws/config

if [ "x$EXTERNAL_ID" != "x" ]; then
  echo "external_id=$EXTERNAL_ID" >> ~/.aws/config
fi

# needs AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to be set.

echo "[builder]" >> ~/.aws/credentials
echo "aws_access_key_id=$AWS_ACCESS_KEY_ID" >> ~/.aws/credentials
echo "aws_secret_access_key=$AWS_SECRET_ACCESS_KEY" >> ~/.aws/credentials
<commit_msg>enabled --profile for aws stuff, in addition to default<commit_after>#!/bin/bash

set -e

mkdir -p ~/.aws

rm -rf ~/.aws/*

echo "[default]" >> ~/.aws/config
echo "region=$REGION" >> ~/.aws/config
echo "role_arn=$ROLE_ARN" >> ~/.aws/config
echo "source_profile=builder" >> ~/.aws/config

echo "" >> ~/.aws/config

echo "[profile builder]" >> ~/.aws/config
echo "region=$REGION" >> ~/.aws/config
echo "role_arn=$ROLE_ARN" >> ~/.aws/config
echo "source_profile=builder" >> ~/.aws/config

if [ "x$EXTERNAL_ID" != "x" ]; then
  echo "external_id=$EXTERNAL_ID" >> ~/.aws/config
fi

# needs AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to be set.

echo "[builder]" >> ~/.aws/credentials
echo "aws_access_key_id=$AWS_ACCESS_KEY_ID" >> ~/.aws/credentials
echo "aws_secret_access_key=$AWS_SECRET_ACCESS_KEY" >> ~/.aws/credentials

{'fraction_non_alphanumeric': 0.19142857142857142, 'fraction_numerical': 0.0, 'mean_word_length': 4.581673306772909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 45, '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': '5852928', 'n_tokens_mistral': 548, 'n_tokens_neox': 541, 'n_words': 113}