<commit_before>
# if a tag hasn't been passed in as a parameter, create a semantic one
if [ ! -n "$tag" ]; then
    git commit --allow-empty -m "generating a new release"
    docker run --rm  -v"$(pwd)":/app  -ti semantic-release  -- semantic-release version
    export pwd=$(pwd)
    git push        
    export TAG=$(docker run --tty=false --rm  -v$pwd:/app  -i semantic-release -- semantic-release version --noop | grep "Current version: " | cut -d ' ' -f 3 | sed -e "s/\r//")
else
    echo "You passed in '$tag' as the custom tag"
    # TR == test release
    echo "Renaming as 'TR-$tag' to avoid potential conflicts."
    export TAG="TR-$tag"
fi

echo $TAG

git tag "v${TAG}"
git push --tags
cd ../django-accelerator && git tag "v${TAG}"
git push --tags 
cd ../accelerate && git tag "v${TAG}"
git push --tags
cd ../front-end && git tag "v${TAG}"
git push --tags

<commit_msg>[AC-7511] added comment to explain second semantic-release call; minor cleanup<commit_after># If a tag hasn't been passed in as a parameter, create a semantic one
if [ ! -n "$tag" ]; then
    git commit --allow-empty -m "Generating a new release"
    docker run --rm  -v"$(pwd)":/app  -ti semantic-release  -- semantic-release version
    git push
    # Run semantic-release again, in no-op mode, to grab the generated version for tagging
    export TAG=$(docker run --tty=false --rm  -v$(pwd):/app  -i semantic-release -- semantic-release version --noop | grep "Current version: " | cut -d ' ' -f 3 | sed -e "s/\r//")
else
    echo "You passed in '$tag' as the custom tag"
    # TR == test release
    echo "Renaming as 'TR-$tag' to avoid potential conflicts."
    export TAG="TR-$tag"
fi

echo $TAG

git tag "v${TAG}"
git push --tags
cd ../django-accelerator && git tag "v${TAG}"
git push --tags 
cd ../accelerate && git tag "v${TAG}"
git push --tags
cd ../front-end && git tag "v${TAG}"
git push --tags


{'fraction_non_alphanumeric': 0.15474297827239003, 'fraction_numerical': 0.003179650238473768, 'mean_word_length': 2.7684630738522955, 'pattern_counts': {'":': 2, '<': 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': '1409048', 'n_tokens_mistral': 654, 'n_tokens_neox': 607, 'n_words': 252}