add build settings

This commit is contained in:
Egor Svitin
2023-01-30 10:45:26 +03:00
parent aaf98fc65e
commit e50cc762cf
5 changed files with 67 additions and 19 deletions

41
build/build.xml Normal file
View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="LiveCarta MetaData project" default="full-build">
<target name="build"
depends="copy, replace, archive"
description="Performs static analysis, runs the tests, and generates project documentation"/>
<target name="replace"
unless="replace.done"
description="Replace placeholders in config files" >
<replace file="../.env" token="@lcDbName@" value="${lcDbName}"/>
<replace file="../.env" token="@lcDbHost@" value="${lcDbHost}"/>
<replace file="../.env" token="@lcApiUrl@" value="${lcApiUrl}"/>
<replace file="../.env" token="@lcApiKey@" value="${lcApiKey}"/>
<property name="replace.done" value="true"/>
</target>
<target name="copy"
unless="copy.done"
description="Replace placeholders in config files" >
<copy file="../.env.sample" tofile="../.env"/>
<property name="copy.done" value="true"/>
</target>
<target name="archive">
<tar compression="gzip" destfile="lc_meta.tar.gz" longfile="posix">
<tarfileset dir="${basedir}/..">
<include name="*/**" />
<exclude name="build/**" />
</tarfileset>
</tar>
</target>
</project>