This repository has been archived on 2026-04-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
BookConverter/ci_build/build.xml
2020-11-25 17:15:32 +03:00

89 lines
4.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project name="LawCarta converter project" default="full-build">
<target name="full-build"
depends="prepare"
description="Performs static analysis, runs the tests, and generates project documentation"/>
<target name="replace"
unless="replace.done"
description="Replace placeholders in config files" >
<replace dir="../environments" token="@ApiURLDev@" value="${ApiURLDev}"/>
<replace dir="../environments" token="@lcUsernameDev@" value="${lcUsernameDev}"/>
<replace dir="../environments" token="@lcPasswordDev@" value="${lcPasswordDev}"/>
<replace dir="../environments" token="@lcQueUsernameDev@" value="${lcQueUsernameDev}"/>
<replace dir="../environments" token="@lcQuePasswordDev@" value="${lcQuePasswordDev}"/>
<replace dir="../environments" token="@lcQueHostDev@" value="${lcQueHostDev}"/>
<replace dir="../environments" token="@lcQuePortDev@" value="${lcQuePortDev}"/>
<replace dir="../environments" token="@ApiURLQA@" value="${ApiURLQA}"/>
<replace dir="../environments" token="@lcUsernameQA@" value="${lcUsernameQA}"/>
<replace dir="../environments" token="@lcPasswordQA@" value="${lcPasswordQA}"/>
<replace dir="../environments" token="@lcQueUsernameQA@" value="${lcQueUsernameQA}"/>
<replace dir="../environments" token="@lcQuePasswordQA@" value="${lcQuePasswordQA}"/>
<replace dir="../environments" token="@lcQueHostQA@" value="${lcQueHostQA}"/>
<replace dir="../environments" token="@lcQuePortQA@" value="${lcQuePortQA}"/>
<replace dir="../environments" token="@ApiURLDemo@" value="${ApiURLDemo}"/>
<replace dir="../environments" token="@lcUsernameDemo@" value="${lcUsernameDemo}"/>
<replace dir="../environments" token="@lcPasswordDemo@" value="${lcPasswordDemo}"/>
<replace dir="../environments" token="@lcQueUsernameDemo@" value="${lcQueUsernameDemo}"/>
<replace dir="../environments" token="@lcQuePasswordDemo@" value="${lcQuePasswordDemo}"/>
<replace dir="../environments" token="@lcQueHostDemo@" value="${lcQueHostDemo}"/>
<replace dir="../environments" token="@lcQuePortDemo@" value="${lcQuePortDemo}"/>
<replace dir="../environments" token="@ApiURLStaging@" value="${ApiURLStaging}"/>
<replace dir="../environments" token="@lcUsernameStaging@" value="${lcUsernameStaging}"/>
<replace dir="../environments" token="@lcPasswordStaging@" value="${lcPasswordStaging}"/>
<replace dir="../environments" token="@lcQueUsernameStaging@" value="${lcQueUsernameStaging}"/>
<replace dir="../environments" token="@lcQuePasswordStaging@" value="${lcQuePasswordStaging}"/>
<replace dir="../environments" token="@lcQueHostStaging@" value="${lcQueHostStaging}"/>
<replace dir="../environments" token="@lcQuePortStaging@" value="${lcQuePortStaging}"/>
<replace dir="../environments" token="@ApiURLProd@" value="${ApiURLProd}"/>
<replace dir="../environments" token="@lcUsernameProd@" value="${lcUsernameProd}"/>
<replace dir="../environments" token="@lcPasswordProd@" value="${lcPasswordProd}"/>
<replace dir="../environments" token="@lcQueUsernameProd@" value="${lcQueUsernameProd}"/>
<replace dir="../environments" token="@lcQuePasswordProd@" value="${lcQuePasswordProd}"/>
<replace dir="../environments" token="@lcQueHostProd@" value="${lcQueHostProd}"/>
<replace dir="../environments" token="@lcQuePortProd@" value="${lcQuePortProd}"/>
<property name="replace.done" value="true"/>
</target>
<target name="clean"
unless="clean.done"
description="Cleanup build artifacts">
<delete dir="${basedir}/coverage"/>
<delete dir="${basedir}/logs"/>
<delete dir="${basedir}/../tests/_log" includes="**/*" />
<property name="clean.done" value="true"/>
</target>
<target name="prepare"
unless="prepare.done"
depends="clean"
description="Prepare for build">
<mkdir dir="${basedir}/coverage"/>
<mkdir dir="${basedir}/logs"/>
<property name="prepare.done" value="true"/>
</target>
<target name="build-without-tests"
depends="replace, archive"
description="Build project and run all tests"/>
<target name="archive">
<tar compression="gzip" destfile="lc_converter.tar.gz">
<tarfileset dir="${basedir}/..">
<include name="*/**" />
<exclude name="build/**" />
<exclude name="lc_converter.tar.gz" />
</tarfileset>
</tar>
</target>
</project>