<commit_before>#!/bin/sh

# Writes a version file for commands that need it.

DESC=$(git describe --tags --always)

writeVersion() {
    cat > $1 << EOF
package main

const (
    appVersion = "$DESC"
)
EOF
}

for d in src/cmd/*; do
    VERSION="$d/version.go"
    if [ -f $VERSION ]; then
        grep '"$DESC"' $VERSION >/dev/null || writeVersion $VERSION
    else
        writeVersion $VERSION
    fi
done<commit_msg>tools: exact match for grep<commit_after>#!/bin/sh

# Writes a version file for commands that need it.

DESC=$(git describe --tags --always)

writeVersion() {
    cat > $1 << EOF
package main

const (
    appVersion = "$DESC"
)
EOF
}

for d in src/cmd/*; do
    VERSION="$d/version.go"
    if [ -f $VERSION ]; then
        grep "\<$DESC\>" $VERSION >/dev/null || writeVersion $VERSION
    else
        writeVersion $VERSION
    fi
done
{'fraction_non_alphanumeric': 0.14168618266978922, 'fraction_numerical': 0.00234192037470726, 'mean_word_length': 2.6382978723404253, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '4777073', 'n_tokens_mistral': 292, 'n_tokens_neox': 285, 'n_words': 93}