-
-
Save SmetDenis/a42718ed65d3fd0d2dc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="builder" default="build"> | |
<!-- Sets the DSTAMP, TSTAMP and TODAY properties --> | |
<tstamp/> | |
<!-- ============================================ --> | |
<!-- Target: build --> | |
<!-- ============================================ --> | |
<target name="build" description="Загрузка управляющего меню"> | |
<!-- Main Menu --> | |
<echo>Превед Лентяй. Выбери нужное действие и ткни циферку на клаве.</echo> | |
<echo>----------------------------------------</echo> | |
<echo>1) create codes and upload on tcx</echo> | |
<echo>2) create codes and upload on uat dmp_uat_codes</echo> | |
<echo>3) sync mmp, onphp</echo> | |
<echo>x) Exit</echo> | |
<echo>----------------------------------------</echo> | |
<input propertyName="choice" validargs="1,2,3,x">Выберите нужное действие</input> | |
<if> | |
<equals arg1="${choice}" arg2="1" /> | |
<then> | |
<property file="tcx.properties" /> | |
<phingcall target="insertCodes" /> | |
</then> | |
<elseif> | |
<equals arg1="${choice}" arg2="2" /> | |
<then> | |
<property file="uat.properties" /> | |
<phingcall target="insertCodes" /> | |
</then> | |
</elseif> | |
<elseif> | |
<equals arg1="${choice}" arg2="3" /> | |
<then> | |
<property file="tcx.properties" /> | |
<phingcall target="syncTcx" > | |
<property name="project" value="onphp" /> | |
</phingcall> | |
<phingcall target="syncTcx" > | |
<property name="project" value="mm_platform" /> | |
</phingcall> | |
</then> | |
</elseif> | |
<elseif> | |
<equals arg1="${choice}" arg2="x" /> | |
<then> | |
<echo>Пока!</echo> | |
<php expression="exit();" /> | |
</then> | |
</elseif> | |
</if> | |
<tstamp /> | |
</target> | |
<target name="createCodes"> | |
<if> | |
<and> | |
<isset property="codeprefix"/> | |
<isset property="count"/> | |
</and> | |
<then> | |
<echo>--codepefix=${codeprefix}</echo> | |
<echo>--count=${count}</echo> | |
<exec command="php codes/createCodes.php --codepefix=${codeprefix} --count=${count}" output="codes/codes.txt"/> | |
</then> | |
<else> | |
<echo>Нет необходимых параметров строки -Dcodepefix и -Dcount</echo> | |
</else> | |
</if> | |
</target> | |
<target name="insertCodes" depends="createCodes"> | |
<echo>--host=${codes.host} --user=${codes.user} --pass=${codes.pass} --db=${codes.db} --typeId=${codes.typeid} --sourceId=${codes.sourceId}</echo> | |
<exec command="php codes/packCodeInsert.php --host=${codes.host} --user=${codes.user} --pass=${codes.pass} --db=${codes.db} --typeId=${codes.typeid} --sourceId=${codes.sourceId} " outputProperty="result" escape="false"/> | |
<echo>${result}</echo> | |
</target> | |
<target name="syncTcx"> | |
<if> | |
<isset property="project"/> | |
<then> | |
<exec command="sh tcx-sync.sh ${project}" outputProperty="result" escape="false"/> | |
<echo>${result}</echo> | |
</then> | |
<else> | |
<echo>Нет необходимых параметров строки -Dproject</echo> | |
</else> | |
</if> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment