<commit_before>#!/bin/bash
#
# Simple helper script to do a full local  build

set -x
set -o errexit -o pipefail

# Fail quickly if docker isn't working / up
docker ps

# Cleanup from previous build
rm -rf build/venv

# Force Python stdout/err to be unbuffered.
export PYTHONUNBUFFERED="notemtpy"

# Write a DC/OS Release tool configuration file which specifies where the build
# should be published to. This default config makes the release tool push the
# release to a folder in the current user's home directory.
if [ ! -f dcos-release.config.yaml ]; then
cat <<EOF > dcos-release.config.yaml
storage:
  local:
    kind: local_path
    path: $HOME/dcos-artifacts
options:
  preferred: local
  cloudformation_s3_url: https://s3-us-west-2.amazonaws.com/downloads.dcos.io/dcos
EOF
fi

# Create a python virtual environment to install the DC/OS tools to
pyvenv build/env
. build/env/bin/activate

# Install the DC/OS tools
./prep_local

# Build a release of DC/OS
release create `whoami` local_build<commit_msg>Move build venv outside of source dir<commit_after>#!/bin/bash
#
# Simple helper script to do a full local  build

set -x
set -o errexit -o pipefail

# Fail quickly if docker isn't working / up
docker ps

# Cleanup from previous build
rm -rf /tmp/dcos_build_venv

# Force Python stdout/err to be unbuffered.
export PYTHONUNBUFFERED="notemtpy"

# Write a DC/OS Release tool configuration file which specifies where the build
# should be published to. This default config makes the release tool push the
# release to a folder in the current user's home directory.
if [ ! -f dcos-release.config.yaml ]; then
cat <<EOF > dcos-release.config.yaml
storage:
  local:
    kind: local_path
    path: $HOME/dcos-artifacts
options:
  preferred: local
  cloudformation_s3_url: https://s3-us-west-2.amazonaws.com/downloads.dcos.io/dcos
EOF
fi

# Create a python virtual environment to install the DC/OS tools to
pyvenv /tmp/dcos_build_venv
. /tmp/dcos_build_venv/bin/activate

# Install the DC/OS tools
./prep_local

# Build a release of DC/OS
release create `whoami` local_build
{'fraction_non_alphanumeric': 0.0804431599229287, 'fraction_numerical': 0.002890173410404624, 'mean_word_length': 3.9218009478672986, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '294058', 'n_tokens_mistral': 680, 'n_tokens_neox': 669, 'n_words': 253}