<commit_before>#!/bin/bash

VER=$1
MSG=$2

if [ -z "$MSG" ]; then
  MSG="Weekly Release"
fi

echo Creating a new release: $VER: $MSG

IFS="." read -a PARTS <<< "$VER"
MAJOR=${PARTS[0]}
MINOR=${PARTS[1]}
MINOR=$((MINOR+1))
VERN=${MAJOR}.${MINOR}

pushd $GOPATH/src/github.com/v2ray/v2ray-core
echo "Adding a new tag: " "v$VER"
git tag -s -a "v$VER" -m "$MSG"
echo "Commiting core.go (may not necessary)"
sed -i '' "s/\(version *= *\"\).*\(\"\)/\1$VERN\2/g" core.go<commit_msg>commit core.go after updating version<commit_after>#!/bin/bash

VER=$1
MSG=$2

if [ -z "$MSG" ]; then
  MSG="Weekly Release"
fi

echo Creating a new release: $VER: $MSG

IFS="." read -a PARTS <<< "$VER"
MAJOR=${PARTS[0]}
MINOR=${PARTS[1]}
MINOR=$((MINOR+1))
VERN=${MAJOR}.${MINOR}

pushd $GOPATH/src/github.com/v2ray/v2ray-core
echo "Adding a new tag: " "v$VER"
git tag -s -a "v$VER" -m "$MSG"
sed -i '' "s/\(version *= *\"\).*\(\"\)/\1$VERN\2/g" core.go
echo "Commiting core.go (may not necessary)"
git commit -S -m "Update version"
{'fraction_non_alphanumeric': 0.24107142857142858, 'fraction_numerical': 0.017857142857142856, 'mean_word_length': 3.995049504950495, 'pattern_counts': {'":': 0, '<': 9, '<?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': '218792', 'n_tokens_mistral': 454, 'n_tokens_neox': 443, 'n_words': 113}