<commit_before>#!/bin/bash
#
# update all version information, delete this file and commit your changes

# constants
manifest=manifest.appcache
self="$0"

# get the current version from the branch name
branch_name="$(git symbolic-ref HEAD 2>/dev/null)" ||
branch_name="(unnamed branch)"     # detached HEAD
branch_name=${branch_name##refs/heads/}
version=${branch_name##release-}

echo $version > Version
git add Version

./createmanifest.sh >$manifest
git add $manifest
# add manifest links to all html files
for file in `git ls-files '*.html'`; do
  sed -i -e "/<html/ s/\s*>/ manifest=\"$manifest\">/" $file
done
git add -u
git commit -m "release-$version: manifest generated and linked"

# remove debugging url arguments
for file in `git ls-files '*.html'`; do
  sed -i -e '/urlArgs: "bust="/d' $file
done

git add -u
git rm TODO<commit_msg>pushversion.sh: tolerant urlArgs formatting<commit_after>#!/bin/bash
#
# update all version information, delete this file and commit your changes

# constants
manifest=manifest.appcache
self="$0"

# get the current version from the branch name
branch_name="$(git symbolic-ref HEAD 2>/dev/null)" ||
branch_name="(unnamed branch)"     # detached HEAD
branch_name=${branch_name##refs/heads/}
version=${branch_name##release-}

echo $version > Version
git add Version

./createmanifest.sh >$manifest
git add $manifest
# add manifest links to all html files
for file in `git ls-files '*.html'`; do
  sed -i -e "/<html/ s/\s*>/ manifest=\"$manifest\">/" $file
done
git add -u
git commit -m "release-$version: manifest generated and linked"

# remove debugging url arguments
for file in `git ls-files '*.html'`; do
  sed -i -e '/urlArgs.*bust/d' $file
done

git add -u
git rm TODO
{'fraction_non_alphanumeric': 0.1362842166569598, 'fraction_numerical': 0.0023296447291788003, 'mean_word_length': 4.385579937304075, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '567557', 'n_tokens_mistral': 570, 'n_tokens_neox': 535, 'n_words': 203}