-
Notifications
You must be signed in to change notification settings - Fork 28
/
build.xml
49 lines (39 loc) · 1.51 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="UTF-8"?>
<project name="storefront" default="build">
<target name="build" depends="yarn:install, yarn:build">
<echo message="storefront project"/>
</target>
<target name="yarn:install" description="Yarn - update JavaScript packages dependencies.">
<exec executable="yarn" failonerror="true">
<arg value="install" />
</exec>
<exec executable="yarn" failonerror="true">
<arg value="upgrade" />
</exec>
</target>
<target name="yarn:build" description="Build Frontend">
<exec executable="yarn">
<arg value="cjs"/>
</exec>
<exec executable="gulp">
<arg value="public-image"/>
</exec>
<exec executable="yarn">
<arg value="build"/>
</exec>
</target>
<target name="deploy.tgz">
<tar destfile="${basedir}/${deploy_archive_name}.tar"
basedir="${basedir}"
includes="**/*.*"
excludes="**/.git/**,**/.gitignore,**/public/**"
/>
<gzip destfile="${basedir}/${deploy_archive_name}.tar.gz" src="${basedir}/${deploy_archive_name}.tar"/>
<delete file="${basedir}/${deploy_archive_name}.tar"/>
<exec executable="scp" failonerror="true">
<arg value="${basedir}/${deploy_archive_name}.tar.gz" />
<arg value="${deploy_host}:${deploy_path}" />
</exec>
<delete file="${basedir}/${deploy_archive_name}.tar.gz"/>
</target>
</project>