<commit_before>#!/bin/bash

# release-helper.sh - maintainer utility script to change
# the library version and update all copyright dates
# by carstene1ns 2020, released under the MIT license

year=$(date +%Y)
version=$1

if [[ ! -z $version ]]; then

  if [[ ! $version =~ ^[0-9]\.[0-9]\.[0-9]$ ]]; then

    echo "Invalid version argument. Only digits and dots allowed."
    exit 1

  fi

  echo "Updating Version in:"

  echo "  CMakeLists.txt"
  sed -i "/liblcf VERSION/,1 s/[0-9]\.[0-9]\.[0-9]/$version/" CMakeLists.txt

  echo "  configure.ac"
  sed -i "/AC_INIT/,1 s/[0-9]\.[0-9]\.[0-9]/$version/" configure.ac

  echo "  README.md"<commit_msg>Release helper: Abort on error<commit_after>#!/bin/bash

# release-helper.sh - maintainer utility script to change
# the library version and update all copyright dates
# by carstene1ns 2021, released under the MIT license

set -e

year=$(date +%Y)
version=$1

if [[ ! -z $version ]]; then

  if [[ ! $version =~ ^[0-9]\.[0-9]\.[0-9]$ ]]; then

    echo "Invalid version argument. Only digits and dots allowed."
    exit 1

  fi

  echo "Updating Version in:"

  echo "  CMakeLists.txt"
  sed -i "/liblcf VERSION/,1 s/[0-9]\.[0-9]\.[0-9]/$version/" CMakeLists.txt

  echo "  configure.ac"
  sed -i "/AC_INIT/,1 s/[0-9]\.[0-9]\.[0-9]/$version/" configure.ac

  echo "  README.md"
{'fraction_non_alphanumeric': 0.17908201655379985, 'fraction_numerical': 0.040632054176072234, 'mean_word_length': 2.970149253731343, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4405741', 'n_tokens_mistral': 524, 'n_tokens_neox': 485, 'n_words': 139}