<commit_before>#! /bin/bash

if [ -n "$1" ]
then
  version=$1
else
  echo "This script takes one argument- a version string."
  exit
fi

tempDir="/tmp/grantlee-release"

if [ ! -d "$tempDir" ]
then
  mkdir $tempDir
fi

echo Creating $tempDir/grantlee-$version.tar.gz

git archive --format=tar --prefix=grantlee-$version/ HEAD | gzip > $tempDir/grantlee-$version.tar.gz

echo Unpacking to $tempDir/grantlee-$version
tar -C $tempDir -xvf $tempDir/grantlee-$version.tar.gz

if [ "$?" -ne "0" ]
then
  echo "Error creating tar archive."
  exit
fi

oldDir=$PWD

echo Creating build directory
mkdir -p $tempDir/grantlee-$version/build && cd $tempDir/grantlee-$version/build

echo Building.<commit_msg>Make a release from a tag in git.<commit_after>#! /bin/bash

if [ -n "$1" ]
then
  version=$1
else
  echo "This script takes one argument- a version string."
  exit
fi

tempDir="/tmp/grantlee-release"

if [ ! -d "$tempDir" ]
then
  mkdir $tempDir
fi

echo Creating $tempDir/grantlee-$version.tar.gz

git archive --format=tar --prefix=grantlee-$version/ v_$version | gzip > $tempDir/grantlee-$version.tar.gz

echo Unpacking to $tempDir/grantlee-$version
tar -C $tempDir -xvf $tempDir/grantlee-$version.tar.gz

if [ "$?" -ne "0" ]
then
  echo "Error creating tar archive."
  exit
fi

oldDir=$PWD

echo Creating build directory
mkdir -p $tempDir/grantlee-$version/build && cd $tempDir/grantlee-$version/build

echo Building.
{'fraction_non_alphanumeric': 0.1384180790960452, 'fraction_numerical': 0.00423728813559322, 'mean_word_length': 3.83617747440273, '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': '4296005', 'n_tokens_mistral': 525, 'n_tokens_neox': 497, 'n_words': 144}