This repository was archived by the owner on Apr 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild.xml
More file actions
74 lines (65 loc) · 3.03 KB
/
build.xml
File metadata and controls
74 lines (65 loc) · 3.03 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!--~
~ Part of the Codex Project packages.
~
~ License and copyright information bundled with this package in the LICENSE file.
~
~ @author Robin Radic
~ @copyright Copyright 2017 (c) Codex Project
~ @license http://codex-project.ninja/license The MIT License
-->
<project name="codex/core" default="start">
<property file="build.properties"/>
<property name="tools.dir" value=""/>
<property name="tools.ext" value=""/>
<property name="vendor.dir" value="${project.basedir}/vendor"/>
<!-- Check if jenkins or local, then take appropriate actions -->
<if>
<equals arg1="${env}" arg2="local"/>
<then>
<property name="vendor.dir" override="true" value="${project.basedir}/../../../vendor"/>
<echo message="We're not on jenkins. Vendor dir: ${vendor.dir}"/>
<import file="local.build.xml" description="Local tasks for in workbench"/>
</then>
<else>
<property name="vendor.dir" override="true" value="${project.basedir}/vendor"/>
<echo message="We're on jenkins. Vendor dir: ${vendor.dir}"/>
<import file="vendor/laradic/phing/jenkins.xml" description="Jenkins tasks"/>
</else>
</if>
<target name="start">
<phingcall target="build" />
</target>
<target name="theme-clean" description="clean the theme files">
<delete dir="${project.basedir}/resources/assets"/>
<delete dir="${project.basedir}/node_modules"/>
</target>
<target name="theme-install" description="install the theme node module">
<exec command="npm install" dir="${project.basedir}" logoutput="true" passthru="true"/>
</target>
<target name="theme-copy" description="copy the theme distribution files to assets" >
<delete dir="${project.basedir}/resources/assets"/>
<delete file="${project.basedir}/resources/assets"/>
<copy todir="${project.basedir}/resources/assets">
<fileset dir="${project.basedir}/node_modules/codex-theme/dist/assets">
<include name="**"/>
</fileset>
</copy>
</target>
<target name="theme">
<phingcall target="theme-clean"/>
<phingcall target="theme-install"/>
<phingcall target="theme-copy"/>
</target>
<target name="theme-link-dist">
<delete dir="${project.basedir}/resources/assets"/>
<delete file="${project.basedir}/resources/assets"/>
<exec command="npm link codex-theme" dir="${project.basedir}" logoutput="true" passthru="true"/>
<symlink target="node_modules/codex-theme/dist/assets" link="resources/assets" />
</target>
<target name="theme-link-dev">
<delete dir="${project.basedir}/resources/assets"/>
<delete file="${project.basedir}/resources/assets"/>
<exec command="npm link codex-theme" dir="${project.basedir}" logoutput="true" passthru="true"/>
<symlink target="${project.basedir}/node_modules/codex-theme/dev/assets" link="${project.basedir}/resources/assets" />
</target>
</project>