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

die() {
    echo "Error: " $*
    exit 1
}

warn() {
    echo "Warning: " $*
}

info() {
    echo "Info: " $*
}

debug() {
    test ${DEBUG1} == true && return true || return false
}

DEBUG1=${DEBUG1:-false}
debug && set -x || set +x
debug && python --version || true

test ! -s bin/activate && virtualenv . || true
test -s bin/activate && source bin/activate || true
pip install -r src/requirements.txt
debug && pip list || true

environment=${environment:-error}
test ${environment} == "error" && die environment not set! || true
type=${type:-error}
test ${type} == "error" && die type not set! || true
target=${target:-error}
test ${target} == "error" && die target not set! || true

info Make v2.arjs.net with ${environment} ${type} ${target}

pushd src
make ${environment} ${type} ${target}

info Done.
<commit_msg>Code for pushing the tag back to the repo;<commit_after>#!/usr/bin/env bash

die() {
    echo "Error: " $*
    exit 1
}

warn() {
    echo "Warning: " $*
}

info() {
    echo "Info: " $*
}

debug() {
    test ${DEBUG1} == true && return true || return false
}

DEBUG1=${DEBUG1:-false}
debug && set -x || set +x
debug && python --version || true

test ! -s bin/activate && virtualenv . || true
test -s bin/activate && source bin/activate || true
pip install -r src/requirements.txt
debug && pip list || true

environment=${environment:-error}
test ${environment} == "error" && die environment not set! || true
type=${type:-error}
test ${type} == "error" && die type not set! || true
target=${target:-error}
test ${target} == "error" && die target not set! || true

info Make v2.arjs.net with ${environment} ${type} ${target}

pushd src
make ${environment} ${type} ${target}
test "${environment}" == "prod" && git checkout master && git pull && git push --tags || true

info Done.

{'fraction_non_alphanumeric': 0.1885558583106267, 'fraction_numerical': 0.005449591280653951, 'mean_word_length': 3.683673469387755, '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': '2476155', 'n_tokens_mistral': 606, 'n_tokens_neox': 593, 'n_words': 204}