<commit_before>#!/bin/bash
# builds Freeciv-web and copies the war file to resin.

ROOTDIR="$(pwd)/.."
cp -R ${ROOTDIR}/freeciv/freeciv/data/flags/*.svg ${ROOTDIR}/freeciv-web/src/main/webapp/images/flags/
( cd src/main/webapp/meta/private
  ./build_flagspec.sh ${ROOTDIR}/freeciv/freeciv/data/misc/flags.spec )
mvn install && cp target/freeciv-web.war "${ROOTDIR}/resin/webapps/ROOT.war"
<commit_msg>Create build information file accessible from /build.txt<commit_after>#!/bin/bash
# builds Freeciv-web and copies the war file to resin.

ROOTDIR="$(pwd)/.."
cp -R ${ROOTDIR}/freeciv/freeciv/data/flags/*.svg ${ROOTDIR}/freeciv-web/src/main/webapp/images/flags/
( cd src/main/webapp/meta/private
  ./build_flagspec.sh ${ROOTDIR}/freeciv/freeciv/data/misc/flags.spec )

# Creating build.txt info file
REVTMP="$(git rev-parse HEAD 2>/dev/null)"
if test "x$REVTMP" != "x" ; then
  # This is build from git repository.
  echo "This build is from freeciv-web commit: $REVTMP" > ${ROOTDIR}/freeciv-web/src/main/webapp/build.txt
  if ! test $(git diff | wc -l) -eq 0 ; then
    echo "It had local modifications." >> ${ROOTDIR}/freeciv-web/src/main/webapp/build.txt
  fi
else
  rm -f ${ROOTDIR}/freeciv-web/src/main/webapp/build.txt
fi

mvn install && cp target/freeciv-web.war "${ROOTDIR}/resin/webapps/ROOT.war"

{'fraction_non_alphanumeric': 0.16845329249617153, 'fraction_numerical': 0.0015313935681470138, 'mean_word_length': 4.026923076923077, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '7445871', 'n_tokens_mistral': 507, 'n_tokens_neox': 489, 'n_words': 103}