<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== 
     Build repositories                                                            
     ====================================================================== -->
<project name="project" default="default">
	<description>
    	Build repositories
    </description>

	<!-- ================================= 
          target: default
         ================================= -->
	<target name="default" depends="download, reprepro, yumrepo, exportkey">
	</target>

	<!-- ================================= 
          target: download
         ================================= -->
	<target name="download">
		<mkdir dir="download" />
		<parallel threadcount="4">
    		<get-release-2 version="0.1.5"/>
			<get-release-2 version="0.2.5"/>
			<get-release-2 version="0.3.0"/>
	        <get-release-2 version="0.4.0"/>
			<get-release-2 version="0.5.0"/>
			<get-release-2 version="0.6.0"/>
			<get-release-2 version="0.7.0"/>
			<get-release-2 version="0.7.2"/>
			<get-release-2 version="0.7.3"/>
			<get-release-2 version="0.8.1"/>
			<get-release-2 version="0.9.0"/>
		</parallel>
	</target>
	
	<!-- = = = = = = = = = = = = = = = = =
          macrodef: get-release
         = = = = = = = = = = = = = = = = = -->
    <macrodef name="get-release">
        <attribute name="version"/>
        <sequential>
        	<get src="https://github.com/ctron/package-drone/releases/download/v@{version}/package-drone-server-@{version}-1.noarch.rpm" dest="download" usetimestamp="true"/>
            <get src="https://github.com/ctron/package-drone/releases/download/v@{version}/package-drone-server_@{version}_all.deb" dest="download" usetimestamp="true"/>
        </sequential>
    </macrodef>
	
	<!-- = = = = = = = = = = = = = = = = =
          macrodef: get-release-2
         = = = = = = = = = = = = = = = = = -->
    <macrodef name="get-release-2">
        <attribute name="version"/>
        <sequential>
            <get src="https://github.com/ctron/package-drone/releases/download/v@{version}/package-drone-server-@{version}-1.el6.noarch.rpm" dest="download" usetimestamp="true"/>
        	<get src="https://github.com/ctron/package-drone/releases/download/v@{version}/package-drone-server-@{version}-1.el7.noarch.rpm" dest="download" usetimestamp="true"/>
            <get src="https://github.com/ctron/package-drone/releases/download/v@{version}/package-drone-server_@{version}_all.deb" dest="download" usetimestamp="true"/>
        </sequential>
    </macrodef>

	
	<!-- ================================= 
          target: exportkey
         ================================= -->
    <target name="exportkey" if="signKey">
    	<delete file="PD-GPG-KEY"/>
        <exec executable="gpg" dir="yum" failifexecutionfails="true" failonerror="true" output="PD-GPG-KEY">
            <arg value="--export" />
        	<arg value="--armor" />
        	<arg value="${signKey}" />
        </exec>
    </target>

	<!-- ================================= 
          target: reprepro              
         ================================= -->
	<target name="reprepro">
		<delete dir="apt/db" />
		<delete dir="apt/dists" />
		<delete dir="apt/pool" />
		<adddeb src="download/package-drone-server_0.1.5_all.deb" />
		<adddeb src="download/package-drone-server_0.2.5_all.deb" />
		<adddeb src="download/package-drone-server_0.3.0_all.deb" />
		<adddeb src="download/package-drone-server_0.4.0_all.deb" />
		<adddeb src="download/package-drone-server_0.5.0_all.deb" />
		<adddeb src="download/package-drone-server_0.6.0_all.deb" />
		<adddeb src="download/package-drone-server_0.7.0_all.deb" />
		<adddeb src="download/package-drone-server_0.7.2_all.deb" />
		<adddeb src="download/package-drone-server_0.7.3_all.deb" />
		<adddeb src="download/package-drone-server_0.8.1_all.deb" />
	    <adddeb src="download/package-drone-server_0.9.0_all.deb" />
		<adddeb src="download/package-drone-server_0.9.1_all.deb" />
	</target>

	<macrodef name="adddeb">
		<attribute name="src" />
		<sequential>
			<exec executable="reprepro" failifexecutionfails="true" failonerror="true">
				<arg value="-b" />
				<arg file="apt" />
				<arg value="includedeb" />
				<arg value="package-drone" />
				<arg file="@{src}" />
			</exec>
		</sequential>
	</macrodef>

	<!-- ================================= 
          target: yumrepo              
         ================================= -->
	<target name="yumrepo" depends="yumrepo.clean, yumrepo.build, yumrepo.sign">
	</target>

	<!-- - - - - - - - - - - - - - - - - - 
          target: yumrepo.clean
         - - - - - - - - - - - - - - - - - -->
    <target name="yumrepo.clean">
        <delete dir="yum"/>
    </target>
	
	<!-- - - - - - - - - - - - - - - - - - 
          target: yumrepo.build
         - - - - - - - - - - - - - - - - - -->
	<target name="yumrepo.build">
		<mkdir dir="yum/centos/6" />
		<mkdir dir="yum/centos/7" />
		
		<copy todir="yum/centos/7">
			<fileset dir="download">
				<include name="*-1.noarch.rpm" />
				<include name="*.el7.noarch.rpm" />
			</fileset>
		</copy>
		
		<copy todir="yum/centos/6">
            <fileset dir="download">
                <include name="*.el6.noarch.rpm" />
            </fileset>
        </copy>
		
		<parallel>
    		<exec executable="createrepo" dir="yum/centos/6" failifexecutionfails="true" failonerror="true">
    			<arg value="--deltas"/>
    			<arg value="--workers"/><arg value="4"/>
    			<arg value="--oldpackagedirs"/>
    			<arg file="yum/centos/6"/>
    			<arg value="." />
    		</exec>
    		<exec executable="createrepo" dir="yum/centos/7" failifexecutionfails="true" failonerror="true">
                <arg value="--deltas"/>
    			<arg value="--workers"/><arg value="4"/>
    			<arg value="--oldpackagedirs"/>
    			<arg file="yum/centos/7"/>
                <arg value="." />
            </exec>
		</parallel>
	</target>

	<!-- - - - - - - - - - - - - - - - - - 
          target: yumrepo.sign
         - - - - - - - - - - - - - - - - - -->
	<target name="yumrepo.sign" if="signKey" depends="exportkey">
		<yumsign dir="yum/centos/6"/>
		<yumsign dir="yum/centos/7"/>
	</target>
		
    <!-- = = = = = = = = = = = = = = = = =
          macrodef: yumsign
         = = = = = = = = = = = = = = = = = -->
    <macrodef name="yumsign">
        <attribute name="dir" />
        <sequential>
        	<exec executable="gpg" dir="@{dir}" failifexecutionfails="true" failonerror="true">
	            <arg value="--detach-sign" />
	            <arg value="--batch" />
	            <arg value="--use-agent" />
	            <arg value="-u" />
	            <arg value="${signKey}" />
	            <arg value="--armor" />
	            <arg value="repodata/repomd.xml" />
	        </exec>
        </sequential>
    </macrodef>


</project>
<commit_msg>make repo for 0.10.0<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== 
     Build repositories                                                            
     ====================================================================== -->
<project name="project" default="default">
	<description>
    	Build repositories
    </description>

	<!-- ================================= 
          target: default
         ================================= -->
	<target name="default" depends="download, reprepro, yumrepo, exportkey">
	</target>

	<!-- ================================= 
          target: download
         ================================= -->
	<target name="download">
		<mkdir dir="download" />
		<parallel threadcount="4">
    		<get-release-2 version="0.1.5"/>
			<get-release-2 version="0.2.5"/>
			<get-release-2 version="0.3.0"/>
	        <get-release-2 version="0.4.0"/>
			<get-release-2 version="0.5.0"/>
			<get-release-2 version="0.6.0"/>
			<get-release-2 version="0.7.3"/>
			<get-release-2 version="0.8.1"/>
			<get-release-2 version="0.9.4"/>
		</parallel>
	</target>
	
	<!-- = = = = = = = = = = = = = = = = =
          macrodef: get-release
         = = = = = = = = = = = = = = = = = -->
    <macrodef name="get-release">
        <attribute name="version"/>
        <sequential>
        	<get src="https://github.com/ctron/package-drone/releases/download/v@{version}/package-drone-server-@{version}-1.noarch.rpm" dest="download" usetimestamp="true"/>
            <get src="https://github.com/ctron/package-drone/releases/download/v@{version}/package-drone-server_@{version}_all.deb" dest="download" usetimestamp="true"/>
        </sequential>
    </macrodef>
	
	<!-- = = = = = = = = = = = = = = = = =
          macrodef: get-release-2
         = = = = = = = = = = = = = = = = = -->
    <macrodef name="get-release-2">
        <attribute name="version"/>
        <sequential>
            <get src="https://github.com/ctron/package-drone/releases/download/v@{version}/package-drone-server-@{version}-1.el6.noarch.rpm" dest="download" usetimestamp="true"/>
        	<get src="https://github.com/ctron/package-drone/releases/download/v@{version}/package-drone-server-@{version}-1.el7.noarch.rpm" dest="download" usetimestamp="true"/>
            <get src="https://github.com/ctron/package-drone/releases/download/v@{version}/package-drone-server_@{version}_all.deb" dest="download" usetimestamp="true"/>
        </sequential>
    </macrodef>

	
	<!-- ================================= 
          target: exportkey
         ================================= -->
    <target name="exportkey" if="signKey">
    	<delete file="PD-GPG-KEY"/>
        <exec executable="gpg" dir="yum" failifexecutionfails="true" failonerror="true" output="PD-GPG-KEY">
            <arg value="--export" />
        	<arg value="--armor" />
        	<arg value="${signKey}" />
        </exec>
    </target>

	<!-- ================================= 
          target: reprepro              
         ================================= -->
	<target name="reprepro">
		<delete dir="apt/db" />
		<delete dir="apt/dists" />
		<delete dir="apt/pool" />
		<adddeb src="download/package-drone-server_0.1.5_all.deb" />
		<adddeb src="download/package-drone-server_0.2.5_all.deb" />
		<adddeb src="download/package-drone-server_0.3.0_all.deb" />
		<adddeb src="download/package-drone-server_0.4.0_all.deb" />
		<adddeb src="download/package-drone-server_0.5.0_all.deb" />
		<adddeb src="download/package-drone-server_0.6.0_all.deb" />
		<adddeb src="download/package-drone-server_0.7.3_all.deb" />
		<adddeb src="download/package-drone-server_0.8.1_all.deb" />
	    <adddeb src="download/package-drone-server_0.9.4_all.deb" />
		<adddeb src="download/package-drone-server_0.10.0_all.deb" />
	</target>

	<macrodef name="adddeb">
		<attribute name="src" />
		<sequential>
			<exec executable="reprepro" failifexecutionfails="true" failonerror="true">
				<arg value="-b" />
				<arg file="apt" />
				<arg value="includedeb" />
				<arg value="package-drone" />
				<arg file="@{src}" />
			</exec>
		</sequential>
	</macrodef>

	<!-- ================================= 
          target: yumrepo              
         ================================= -->
	<target name="yumrepo" depends="yumrepo.clean, yumrepo.build, yumrepo.sign">
	</target>

	<!-- - - - - - - - - - - - - - - - - - 
          target: yumrepo.clean
         - - - - - - - - - - - - - - - - - -->
    <target name="yumrepo.clean">
        <delete dir="yum"/>
    </target>
	
	<!-- - - - - - - - - - - - - - - - - - 
          target: yumrepo.build
         - - - - - - - - - - - - - - - - - -->
	<target name="yumrepo.build">
		<mkdir dir="yum/centos/6" />
		<mkdir dir="yum/centos/7" />
		
		<copy todir="yum/centos/7">
			<fileset dir="download">
				<include name="*-1.noarch.rpm" />
				<include name="*.el7.noarch.rpm" />
			</fileset>
		</copy>
		
		<copy todir="yum/centos/6">
            <fileset dir="download">
                <include name="*.el6.noarch.rpm" />
            </fileset>
        </copy>
		
		<parallel>
    		<exec executable="createrepo" dir="yum/centos/6" failifexecutionfails="true" failonerror="true">
    			<arg value="--deltas"/>
    			<arg value="--workers"/><arg value="4"/>
    			<arg value="--oldpackagedirs"/>
    			<arg file="yum/centos/6"/>
    			<arg value="." />
    		</exec>
    		<exec executable="createrepo" dir="yum/centos/7" failifexecutionfails="true" failonerror="true">
                <arg value="--deltas"/>
    			<arg value="--workers"/><arg value="4"/>
    			<arg value="--oldpackagedirs"/>
    			<arg file="yum/centos/7"/>
                <arg value="." />
            </exec>
		</parallel>
	</target>

	<!-- - - - - - - - - - - - - - - - - - 
          target: yumrepo.sign
         - - - - - - - - - - - - - - - - - -->
	<target name="yumrepo.sign" if="signKey" depends="exportkey">
		<yumsign dir="yum/centos/6"/>
		<yumsign dir="yum/centos/7"/>
	</target>
		
    <!-- = = = = = = = = = = = = = = = = =
          macrodef: yumsign
         = = = = = = = = = = = = = = = = = -->
    <macrodef name="yumsign">
        <attribute name="dir" />
        <sequential>
        	<exec executable="gpg" dir="@{dir}" failifexecutionfails="true" failonerror="true">
	            <arg value="--detach-sign" />
	            <arg value="--batch" />
	            <arg value="--use-agent" />
	            <arg value="-u" />
	            <arg value="${signKey}" />
	            <arg value="--armor" />
	            <arg value="repodata/repomd.xml" />
	        </exec>
        </sequential>
    </macrodef>


</project>

{'fraction_non_alphanumeric': 0.26971748087110065, 'fraction_numerical': 0.014935256032960566, 'mean_word_length': 2.2256763170384435, 'pattern_counts': {'":': 0, '<': 285, '<?xml version=': 2, '>': 285, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 112, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '179508', 'n_tokens_mistral': 4979, 'n_tokens_neox': 4525, 'n_words': 571}