<commit_before>#!/usr/bin/env bash
export NODE_PATH=../src/
export NODE_ENV=production
mkdir _release
git clone -b release <EMAIL>:thinktopography/reframe _release
cd _release
cp -f ../package.json ./package.json
../node_modules/babel-cli/bin/babel.js -d ./ ../src/
sass -Cq --scss --compass --sourcemap=none ../src/reframe.scss ./reframe.css
cp ./reframe.css ./reframe.scss

VER=`cat package.json | sed -n 's/.*"version": "\(.*\)".*/\1/p'`

if (git tag | grep $VER); then
    echo "Error: release $VER already exists"; exit 1
fi

git add .
git commit -m "Release $VER" -e
git tag "$VER"
git push
cd ../
rm -rf _release<commit_msg>Update release script to exit with error when code fails to build<commit_after>#!/usr/bin/env bash
export NODE_PATH=../src/
export NODE_ENV=production
mkdir _release
git clone -b release <EMAIL>:thinktopography/reframe _release
cd _release
cp -f ../package.json ./package.json
if (../node_modules/babel-cli/bin/babel.js -d ./ ../src/); then
  sass -Cq --scss --compass --sourcemap=none ../src/reframe.scss ./reframe.css
  cp ./reframe.css ./reframe.scss

  VER=`cat package.json | sed -n 's/.*"version": "\(.*\)".*/\1/p'`

  if (git tag | grep $VER); then
      echo "Error: release $VER already exists"; exit 1
  fi

  git add .
  git commit -m "Release $VER" -e
  git tag "$VER"
  git push
else
  echo " "
  echo "There were errors compiling your code. Please fix these problems before publishing a release."; exit 1
fi

cd ../
rm -rf _release
{'fraction_non_alphanumeric': 0.16124661246612465, 'fraction_numerical': 0.0033875338753387536, 'mean_word_length': 3.002710027100271, 'pattern_counts': {'":': 2, '<': 5, '<?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': '163852', 'n_tokens_mistral': 543, 'n_tokens_neox': 511, 'n_words': 174}