<commit_before>#!/bin/bash

if [ -n "$1" ]
then
  echo "Creating Opus distribution for version $1"
else
  echo "Please supply a version number"
  exit 1
fi

directory=opus-$1

svn export http://opus.googlecode.com/svn/trunk $directory
rm $directory/.gitignore

find $directory -name "AssemblyInfo.cs" | xargs sed 's/AssemblyInformationalVersion("[0-9.]*")/AssemblyInformationalVersion("'$1'")/g' -i

tar -czf opus-$1-source.tgz $directory

pushd $directory
mdtool build --target:Build --configuration:Release Opus.sln
popd

tar -czf opus-$1-binary.tgz $directory/bin $directory/Changelog.txt $directory/env.bat $directory/env.sh $directory/License.txt $directory/packages $directory/testpackages
rm -fr $directory
<commit_msg>[Bam] Updated the buildversion script. Need some more attention, and may actually create git tags<commit_after>#!/bin/bash

if [ -n "$1" ]
then
  echo "Creating BuildAMation distribution for version $1"
else
  echo "Please supply a version number"
  exit 1
fi

directory=BuildAMation-$1

git clone https://github.com/markfinal/BuildAMation.git $directory
# TODO: checkout to a branch or tag
# even better... test if there is a tag, if not, create it, after the version update below
# this would allow creating a fixed point of code with the correct version number, but also being able to
# recreate the exact code again
rm $directory/.gitignore
rm $directory/.git

# Update version number to that specified
find $directory -name "AssemblyInfo.cs" | xargs sed 's/AssemblyInformationalVersion("[0-9.]*")/AssemblyInformationalVersion("'$1'")/g' -i

# tar up the source tree
tar -czf BuildAMation-$1-source.tgz $directory

# now compile the source tree, optimized
pushd $directory
mdtool build --target:Build --configuration:Release BuildAMation.sln
popd

# now tar up the 'bin' folder, and any additional files necessary to ship
tar -czf BuildAMation-$1-binary.tgz $directory/bin $directory/Changelog.txt $directory/COPYING.LESSER $directory/env.bat $directory/env.sh $directory/License.txt $directory/packages $directory/testpackages

# remove checkout folder
rm -fr $directory
{'fraction_non_alphanumeric': 0.10899571632555925, 'fraction_numerical': 0.008567348881485007, 'mean_word_length': 4.806629834254144, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '7080591', 'n_tokens_mistral': 651, 'n_tokens_neox': 628, 'n_words': 222}