<commit_before>#!/bin/bash

# Generate a build ID based on the current time and the PID of this script
build="$(date '+%s')-$$"

# Do the build and capture its output in a .log file
make do_release 2>&1 | tee -a ${build}.log

# Check the exit status of `make`, not `tee`
if [[ ${PIPESTATUS[0]} -eq 0 ]]; then
  subject="omnibus-gitlab build ${build} SUCCESS"
else
  subject="omnibus-gitlab build ${build} FAIL"
fi

# We assume that email to the current system user will somehow reach the right
# human eyes
tail ${build}.log | sed 's/.*\r//' | mail -s "${subject}" $(cat ~/.forward)
<commit_msg>Include more build log lines in email notification<commit_after>#!/bin/bash

# Generate a build ID based on the current time and the PID of this script
build="$(date '+%s')-$$"

# Do the build and capture its output in a .log file
make do_release 2>&1 | tee -a ${build}.log

# Check the exit status of `make`, not `tee`
if [[ ${PIPESTATUS[0]} -eq 0 ]]; then
  subject="omnibus-gitlab build ${build} SUCCESS"
else
  subject="omnibus-gitlab build ${build} FAIL"
fi

# We assume that email to the current system user will somehow reach the right
# human eyes
tail -n 20 ${build}.log | sed 's/.*\r//' | mail -s "${subject}" $(cat ~/.forward)

{'fraction_non_alphanumeric': 0.1467964314679643, 'fraction_numerical': 0.008110300081103, 'mean_word_length': 3.9558232931726907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6380084', 'n_tokens_mistral': 419, 'n_tokens_neox': 396, 'n_words': 175}