<commit_before>#!/bin/bash

travis_build_dir="/home/travis/build/jdgillespie91/twads"
setup_file="${travis_build_dir}/setup.py"

# Determine release version (increment revision number only).
version=$(grep version "${setup_file}" | cut -d\' -f2)
echo "Current version: ${version}"
release_version=${version/%${version##*.}/$((${version##*.}+1))}
echo "Release version: ${release_version}"

echo "DEBUG: ${setup_file}"
echo "DEBUG: $(ls "${setup_file}")"
echo "DEBUG: ${setup_file}"

# Add the version, commit to master and push.
sed -i "s/${version}/${release_version}/" "${setup_file}"
git add "{setup_file}"
git commit -m "[ci skip] Bump version"
git push origin master

# Create the release.
#git tag -a ${release_version} -m "Version ${release_version}"
#git push origin refs/tags/${release_version}
#curl -s -X POST -H "Authorization: Basic <KEY>" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" -d '{"tag_name": "'${release_version}'"}' "https://api.github.com/repos/jdgillespie91/twads/releases"<commit_msg>fix versioning<commit_after>#!/bin/bash

travis_build_dir="/home/travis/build/jdgillespie91/twads"
setup_file="${travis_build_dir}/setup.py"

# Determine release version (increment revision number only).
version=$(grep version "${setup_file}" | cut -d\' -f2)
echo "Current version: ${version}"
release_version=${version/%${version##*.}/$((${version##*.}+1))}
echo "Release version: ${release_version}"

echo "DEBUG: ${setup_file}"
echo "DEBUG: $(ls "${setup_file}")"

# Add the version, commit to master and push.
cat ${setup_file}
sed -i "s/${version}/${release_version}/" "${setup_file}"
cat ${setup_file}
cd ${travis_build_dir}
git add setup.py
git commit -m "[ci skip] Bump version"
git push origin master

# Create the release.
#git tag -a ${release_version} -m "Version ${release_version}"
#git push origin refs/tags/${release_version}
#curl -s -X POST -H "Authorization: Basic <KEY>" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" -d '{"tag_name": "'${release_version}'"}' "https://api.github.com/repos/jdgillespie91/twads/releases"
{'fraction_non_alphanumeric': 0.18885741265344666, 'fraction_numerical': 0.0066100094428706326, 'mean_word_length': 6.016556291390729, 'pattern_counts': {'":': 2, '<': 5, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1585236', 'n_tokens_mistral': 727, 'n_tokens_neox': 719, 'n_words': 189}