<commit_before><?xml version="1.0" encoding="UTF-8"?>

<project name="WPN-XM Server Stack" default="main" basedir=".">

    <!--
         WPN-XM - Phing build file.

         You might find the comprehensive Nant Task Reference under:
         http://www.phing.info/docs/stable/hlhtml/index.html
    -->

    <!--
                        Build Properties
    -->

    <!-- Version -->
    <property name="wpnxm.Name"             value="WPN-XM Server Stack"/>
    <property name="version.Major"          value="0"/>
    <property name="version.Minor"          value="8"/>
    <property name="version.BuildNumber"    value="1"/>
    <property name="wpnxm.Version"          value="${version.Major}.${version.Minor}.${version.BuildNumber}"/>
    <property name="wpnxm.VersionForRcFile" value="${version.Major},${version.Minor},${version.BuildNumber},0"/>

    <!-- Paths -->

    <condition property="dir.Base"      value="${project.basedir}"><os family="windows"/></condition>
    <condition property="dir.Base"      value="${basedir}"><os family="unix"/></condition>

    <property name="dir.Build"          value="${dir.Base}/_build"/>
    <property name="dir.Downloads"      value="${dir.Base}/downloads"/>
    <property name="dir.Installers"     value="${dir.Base}/installers"/>
    <property name="dir.Registry"       value="${dir.Base}/registry"/>

    <!-- WineConsole -->
    <condition property="wineconsole" value="wine"><os family="unix"/></condition>

    <!-- InnoSetup Compiler -->
    <condition property="innosetupcompiler" value="${dir.Base}/bin/innosetup/ISCC.exe"><os family="windows"/></condition>
    <condition property="innosetupcompiler" value="${wineconsole} ${dir.Base}/bin/innosetup/ISCC.exe"><os family="unix"/></condition>

    <!-- Aria -->
    <condition property="aria" value="${dir.Base}/bin/aria/aria2c.exe"><os family="windows"/></condition>
    <condition property="aria" value="aria2c"><os family="unix"/></condition>

    <!-- 7zip -->
    <condition property="7z" value="${dir.Base}/bin/backup/7z.exe"><os family="windows"/></condition>
    <condition property="7z" value="7z"><os family="unix"/></condition>

    <!-- Check aria2c, upx and 7z available on env.PATH when unix-->
    <property environment="env" />
    <available file="7z" filepath="${env.PATH}" property="7z.present"/>
    <available file="aria2c" filepath="${env.PATH}" property="aria2.present"/>
    <available file="upx" filepath="${env.PATH}" property="upx.present"/>

    <echo message="OS is ${os.name}" />
    <echo message="Basedir is ${dir.Base}" />
    <echo message="Building WPN-XM v${wpnxm.Version}" />
    <echo message="Tools found: 7z [${7z.present}] - aria2 [${aria2.present}] - upx [${upx.present}]" />

    <!--
                        Targets (Build Commands)
    -->

    <target name="clean-build-dir" description="Mr. Proper cleans the build environment and recreates it.">
        <delete dir="${dir.Build}"/>
        <mkdir dir="${dir.Build}"/>
        <delete dir="${dir.Downloads}/stripdown"/>
        <delete dir="${dir.Base}/www/tools/webinterface"/>
        <delete>
            <fileset dir="${dir.Registry}">
                <include name="**/downloads*.json" />
            </fileset>
        </delete>
    </target>

    <target name="reset-git-submodules" description="Reset the git submodules to their original state.">
         <!-- hard reset to latest commit and drop all untracked files and folders, e.g. /build crap. --><commit_msg>testing without brackets, because vars are not displayed<commit_after><?xml version="1.0" encoding="UTF-8"?>

<project name="WPN-XM Server Stack" default="main" basedir=".">

    <!--
         WPN-XM - Phing build file.

         You might find the comprehensive Nant Task Reference under:
         http://www.phing.info/docs/stable/hlhtml/index.html
    -->

    <!--
                        Build Properties
    -->

    <!-- Version -->
    <property name="wpnxm.Name"             value="WPN-XM Server Stack"/>
    <property name="version.Major"          value="0"/>
    <property name="version.Minor"          value="8"/>
    <property name="version.BuildNumber"    value="1"/>
    <property name="wpnxm.Version"          value="${version.Major}.${version.Minor}.${version.BuildNumber}"/>
    <property name="wpnxm.VersionForRcFile" value="${version.Major},${version.Minor},${version.BuildNumber},0"/>

    <!-- Paths -->

    <condition property="dir.Base"      value="${project.basedir}"><os family="windows"/></condition>
    <condition property="dir.Base"      value="${basedir}"><os family="unix"/></condition>

    <property name="dir.Build"          value="${dir.Base}/_build"/>
    <property name="dir.Downloads"      value="${dir.Base}/downloads"/>
    <property name="dir.Installers"     value="${dir.Base}/installers"/>
    <property name="dir.Registry"       value="${dir.Base}/registry"/>

    <!-- WineConsole -->
    <condition property="wineconsole" value="wine"><os family="unix"/></condition>

    <!-- InnoSetup Compiler -->
    <condition property="innosetupcompiler" value="${dir.Base}/bin/innosetup/ISCC.exe"><os family="windows"/></condition>
    <condition property="innosetupcompiler" value="${wineconsole} ${dir.Base}/bin/innosetup/ISCC.exe"><os family="unix"/></condition>

    <!-- Aria -->
    <condition property="aria" value="${dir.Base}/bin/aria/aria2c.exe"><os family="windows"/></condition>
    <condition property="aria" value="aria2c"><os family="unix"/></condition>

    <!-- 7zip -->
    <condition property="7z" value="${dir.Base}/bin/backup/7z.exe"><os family="windows"/></condition>
    <condition property="7z" value="7z"><os family="unix"/></condition>

    <!-- Check aria2c, upx and 7z available on env.PATH when unix-->
    <property environment="env" />
    <available file="7z" filepath="${env.PATH}" property="7z.present"/>
    <available file="aria2c" filepath="${env.PATH}" property="aria2.present"/>
    <available file="upx" filepath="${env.PATH}" property="upx.present"/>

    <echo message="OS is ${os.name}" />
    <echo message="Basedir is ${dir.Base}" />
    <echo message="Building WPN-XM v${wpnxm.Version}" />
    <echo message="Tools found: 7z [{7z.present} - aria2 ${aria2.present} - upx ${upx.present}" />

    <!--
                        Targets (Build Commands)
    -->

    <target name="clean-build-dir" description="Mr. Proper cleans the build environment and recreates it.">
        <delete dir="${dir.Build}"/>
        <mkdir dir="${dir.Build}"/>
        <delete dir="${dir.Downloads}/stripdown"/>
        <delete dir="${dir.Base}/www/tools/webinterface"/>
        <delete>
            <fileset dir="${dir.Registry}">
                <include name="**/downloads*.json" />
            </fileset>
        </delete>
    </target>

    <target name="reset-git-submodules" description="Reset the git submodules to their original state.">
         <!-- hard reset to latest commit and drop all untracked files and folders, e.g. /build crap. -->
{'fraction_non_alphanumeric': 0.19616540277579053, 'fraction_numerical': 0.006867935326942338, 'mean_word_length': 3.049826187717265, 'pattern_counts': {'":': 0, '<': 143, '<?xml version=': 2, '>': 143, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '438119', 'n_tokens_mistral': 2117, 'n_tokens_neox': 2042, 'n_words': 409}