<commit_before><?xml version="1.0"?>

<!-- Smack Build Script ========================================== -->
<!-- Jive Software      ============================================== -->

<!--
    $RCSfile$
    $Revision$
    $Date$
-->

<project name="Smack Release Script" default="all" basedir="..">

    <!-- Include Ant Optional Tasks -->
    <taskdef resource="net/sf/antcontrib/antcontrib.properties">
        <classpath>
            <pathelement location="${basedir}/build/ant-contrib.jar"/>
        </classpath>
    </taskdef>

    <!-- PROPERTIES -->
    <!-- ======================================================================================= -->

    <!-- TARGETS -->
    <!-- ======================================================================================= -->

    <!-- all -->
    <!-- ======================================================================================= -->
    <target name="all">
        <!-- create release properties -->
        <if>
            <equals arg1="${dailybuild}" arg2="true" />
            <then>
                <tstamp>
                    <format property="build.date" pattern="MMM-dd-yyyy" locale="en"/>
                </tstamp>
                <property name="release.name" value="smack-${build.date}" />
                <property name="release-dev.name" value="smack-dev-${build.date}" />
            </then>
            <else>
                <property name="release.name" value="smack-${version.name}" />
                <property name="release-dev.name" value="smack-dev-${version.name}" />
            </else>
        </if>
        <property name="release.dir" value="${basedir}/release/${release.name}" />
        <property name="release-dev.dir" value="${basedir}/release/${release-dev.name}" />
        <!-- create release dirs -->
        <mkdir dir="${release.dir}" />
        <mkdir dir="${release-dev.dir}" />
        <!-- Copy smack.jar -->
        <copy todir="${release.dir}">
            <fileset dir="${jar.dest.dir}" includes="smack.jar" />
            <fileset dir="${jar.dest.dir}" includes="smackx.jar" />
        </copy>
        <copy todir="${release-dev.dir}">
            <fileset dir="${jar.dest.dir}" includes="smack.jar" />
            <fileset dir="${jar.dest.dir}" includes="smackx.jar" />
        </copy>
        <!-- Copy build dir -->
        <copy todir="${release-dev.dir}/build">
            <fileset dir="${basedir}/build">
                <include name="ant*" />
                <include name="junit.jar" />
                <include name="build.xml" />
                <include name="README.html" />
                <include name="lib/*.jar" />
                <include name="merge/*.jar" />
            </fileset>
        </copy>
        <!-- Copy Javadocs -->
        <copy todir="${release.dir}/javadoc">
            <fileset dir="${basedir}/javadoc" includes="**/*.*" />
        </copy>
        <copy todir="${release-dev.dir}/javadoc">
            <fileset dir="${basedir}/javadoc" includes="**/*.*" />
        </copy>
        <!-- Copy documentation -->
        <copy todir="${release.dir}/documentation">
            <fileset dir="${basedir}/documentation" includes="**/*.*" />
        </copy>
        <copy todir="${release-dev.dir}/documentation">
            <fileset dir="${basedir}/documentation" includes="**/*.*" />
        </copy>
        <!-- Copy source -->
        <copy todir="${release-dev.dir}/source">
            <fileset dir="${basedir}/source" includes="**/*.java" />
            <fileset dir="${basedir}/source" includes="**/*.html" />
        </copy>
        <copy todir="${release-dev.dir}/test">
            <fileset dir="${basedir}/test" includes="**/*.java" />
        </copy>
        <!-- Copy resources -->
        <copy todir="${release-dev.dir}/build/resources">
            <fileset dir="${basedir}/build/resources" includes="META-INF/smack.providers" />
        </copy>
        <!-- Copy readme.html and changelog.html -->
        <copy todir="${release.dir}">
            <fileset dir="${basedir}/build/resources/releasedocs" includes="*.html" />
        </copy>
        <copy todir="${release-dev.dir}">
            <fileset dir="${basedir}/build/resources/releasedocs" includes="*.html" />
        </copy>
        <!-- Package -->
        <zip destfile="${basedir}/release/${release.name}.zip"
            basedir="${release.dir}/.."
            includes="${release.name}/**/*.*"
        />
        <tar destfile="${basedir}/release/${release.name}.tar.gz"
            basedir="${release.dir}/.."
            includes="${release.name}/**/*.*"
            compression="gzip"
        />
        <zip destfile="${basedir}/release/${release-dev.name}.zip"
            basedir="${release-dev.dir}/.."
            includes="${release-dev.name}/**/*.*"
        />
        <tar destfile="${basedir}/release/${release-dev.name}.tar.gz"
            basedir="${release-dev.dir}/.."
            includes="${release-dev.name}/**/*.*"
            compression="gzip"
        />

        <echo>
-----------------------------------------------
Release made, testing Ant targets of release...
-----------------------------------------------
        </echo>

        <!-- call the release tester -->
        <antcall target="test" />
    </target>

    <!-- test -->
    <!-- ======================================================================================= -->
    <target name="test">
        <property name="testdir" value="${release-dev.dir}/.test" />

        <!-- copy the build to a temp dir so we can run sanity tests -->
        <mkdir dir="${testdir}" />
        <copy todir="${testdir}">
            <fileset dir="${release-dev.dir}">
                <exclude name=".test/**/*.*" />
            </fileset>
        </copy>

        <!-- run sanity tests -->
        <ant dir="${testdir}" antfile="build/build.xml" target="jar" inheritAll="false">
            <property name="no.test" value="true" />
        </ant>
        <ant dir="${testdir}" antfile="build/build.xml" target="javadoc" inheritAll="false">
            <property name="no.test" value="true" />
        </ant>
        <ant dir="${testdir}" antfile="build/build.xml" target="clean" inheritAll="false">
            <property name="no.test" value="true" />
        </ant>

        <echo>
----------------------------
...release tests pass, done.
----------------------------
        </echo>
    </target>

</project>
<commit_msg>Fixed issue with daily builds building both dev and app versions.<commit_after><?xml version="1.0"?>

<!-- Smack Build Script ========================================== -->
<!-- Jive Software      ============================================== -->

<!--
    $RCSfile$
    $Revision$
    $Date$
-->

<project name="Smack Release Script" default="all" basedir="..">

    <!-- Include Ant Optional Tasks -->
    <taskdef resource="net/sf/antcontrib/antcontrib.properties">
        <classpath>
            <pathelement location="${basedir}/build/ant-contrib.jar"/>
        </classpath>
    </taskdef>

    <!-- PROPERTIES -->
    <!-- ======================================================================================= -->

    <!-- TARGETS -->
    <!-- ======================================================================================= -->

    <!-- all -->
    <!-- ======================================================================================= -->
    <target name="all">
        <!-- create release properties -->
        <if>
            <equals arg1="${dailybuild}" arg2="true" />
            <then>
                <tstamp>
                    <format property="build.date" pattern="MMM-dd-yyyy" locale="en"/>
                </tstamp>
                <property name="release.name" value="smack-${build.date}" />
                <property name="release-dev.name" value="smack-dev-${build.date}" />
            </then>
            <else>
                <property name="release.name" value="smack-${version.name}" />
                <property name="release-dev.name" value="smack-dev-${version.name}" />
            </else>
        </if>
        <property name="release.dir" value="${basedir}/release/${release.name}" />
        <property name="release-dev.dir" value="${basedir}/release/${release-dev.name}" />
        <!-- create release dirs -->
        <mkdir dir="${release.dir}" />
        <mkdir dir="${release-dev.dir}" />
        <!-- Copy smack.jar -->
        <copy todir="${release.dir}">
            <fileset dir="${jar.dest.dir}" includes="smack.jar" />
            <fileset dir="${jar.dest.dir}" includes="smackx.jar" />
        </copy>
        <copy todir="${release-dev.dir}">
            <fileset dir="${jar.dest.dir}" includes="smack.jar" />
            <fileset dir="${jar.dest.dir}" includes="smackx.jar" />
        </copy>
        <!-- Copy build dir -->
        <copy todir="${release-dev.dir}/build">
            <fileset dir="${basedir}/build">
                <include name="ant*" />
                <include name="junit.jar" />
                <include name="build.xml" />
                <include name="README.html" />
                <include name="lib/*.jar" />
                <include name="merge/*.jar" />
            </fileset>
        </copy>
        <!-- Copy Javadocs -->
        <copy todir="${release.dir}/javadoc">
            <fileset dir="${basedir}/javadoc" includes="**/*.*" />
        </copy>
        <copy todir="${release-dev.dir}/javadoc">
            <fileset dir="${basedir}/javadoc" includes="**/*.*" />
        </copy>
        <!-- Copy documentation -->
        <copy todir="${release.dir}/documentation">
            <fileset dir="${basedir}/documentation" includes="**/*.*" />
        </copy>
        <copy todir="${release-dev.dir}/documentation">
            <fileset dir="${basedir}/documentation" includes="**/*.*" />
        </copy>
        <!-- Copy source -->
        <copy todir="${release-dev.dir}/source">
            <fileset dir="${basedir}/source" includes="**/*.java" />
            <fileset dir="${basedir}/source" includes="**/*.html" />
        </copy>
        <copy todir="${release-dev.dir}/test">
            <fileset dir="${basedir}/test" includes="**/*.java" />
        </copy>
        <!-- Copy resources -->
        <copy todir="${release-dev.dir}/build/resources">
            <fileset dir="${basedir}/build/resources" includes="META-INF/smack.providers" />
        </copy>
        <!-- Copy readme.html and changelog.html -->
        <copy todir="${release.dir}">
            <fileset dir="${basedir}/build/resources/releasedocs" includes="*.html" />
        </copy>
        <copy todir="${release-dev.dir}">
            <fileset dir="${basedir}/build/resources/releasedocs" includes="*.html" />
        </copy>
        <!-- Package -->
        <if>
            <equals arg1="${dailybuild}" arg2="true" />
            <then>
                <zip destfile="${basedir}/release/${release-dev.name}.zip"
                    basedir="${release-dev.dir}/.."
                    includes="${release-dev.name}/**/*.*"
                />
                <tar destfile="${basedir}/release/${release-dev.name}.tar.gz"
                    basedir="${release-dev.dir}/.."
                    includes="${release-dev.name}/**/*.*"
                    compression="gzip"
                />
            </then>
            <else>
                <zip destfile="${basedir}/release/${release.name}.zip"
                    basedir="${release.dir}/.."
                    includes="${release.name}/**/*.*"
                />
                <tar destfile="${basedir}/release/${release.name}.tar.gz"
                    basedir="${release.dir}/.."
                    includes="${release.name}/**/*.*"
                    compression="gzip"
                />
                <zip destfile="${basedir}/release/${release-dev.name}.zip"
                    basedir="${release-dev.dir}/.."
                    includes="${release-dev.name}/**/*.*"
                />
                <tar destfile="${basedir}/release/${release-dev.name}.tar.gz"
                    basedir="${release-dev.dir}/.."
                    includes="${release-dev.name}/**/*.*"
                    compression="gzip"
                />
            </else>
        </if>

        <echo>
-----------------------------------------------
Release made, testing Ant targets of release...
-----------------------------------------------
        </echo>

        <!-- call the release tester -->
        <antcall target="test" />
    </target>

    <!-- test -->
    <!-- ======================================================================================= -->
    <target name="test">
        <property name="testdir" value="${release-dev.dir}/.test" />

        <!-- copy the build to a temp dir so we can run sanity tests -->
        <mkdir dir="${testdir}" />
        <copy todir="${testdir}">
            <fileset dir="${release-dev.dir}">
                <exclude name=".test/**/*.*" />
            </fileset>
        </copy>

        <!-- run sanity tests -->
        <ant dir="${testdir}" antfile="build/build.xml" target="jar" inheritAll="false">
            <property name="no.test" value="true" />
        </ant>
        <ant dir="${testdir}" antfile="build/build.xml" target="javadoc" inheritAll="false">
            <property name="no.test" value="true" />
        </ant>
        <ant dir="${testdir}" antfile="build/build.xml" target="clean" inheritAll="false">
            <property name="no.test" value="true" />
        </ant>

        <echo>
----------------------------
...release tests pass, done.
----------------------------
        </echo>
    </target>

</project>

{'fraction_non_alphanumeric': 0.2767902860068759, 'fraction_numerical': 0.000731475385853266, 'mean_word_length': 1.7867916836526703, 'pattern_counts': {'":': 0, '<': 264, '<?xml version=': 2, '>': 264, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, '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': '461149', 'n_tokens_mistral': 3710, 'n_tokens_neox': 3530, 'n_words': 602}