-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
142 lines (133 loc) · 5.09 KB
/
build.xml
File metadata and controls
142 lines (133 loc) · 5.09 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===========================================================================
# build.xml
# $Id$
#
# Description:
#
# Meta Tags:
# @package Atlas
# @subpackage Meta
# @author Chris R. Feamster <cfeamster@nxsysts.com>
# @author $LastChangedBy$
#
# @version $Revision$
# @copyright (c) 2017 F2 Developments, Inc. All rights reserved.
============================================================================ -->
<project name="Atlas" default="build">
<property file="build.properties" />
<if>
<not>
<or>
<available file="box.json" />
<available file="masthead.txt" />
<available file="PharMain.php" />
<available file="build.properties" />
</or>
</not>
<then>
<fail message="One of build.properties, box.json, PharMain.php or masthead.txt is missing!"/>
</then>
</if>
<tstamp />
<tstamp>
<format property="YEAR" pattern="%Y"/>
</tstamp>
<!-- removed "generate" target for pre constructed prj -->
<!-- ============================================ -->
<!-- Target: prepare -->
<!-- ============================================ -->
<target name="prepare">
<!--
<echo msg="Making directory ./build" />
<mkdir dir="./build" />
<echo msg="Making directory ./docs" />
<mkdir dir="./build" />
-->
<!--Needs "sed"-->
<exec command='svn info | sed -n "/URL:/s/.*\///p"'
outputProperty='svnParentDir'/>
<reflexive>
<fileset dir="."
includes="box.json
masthead.txt
src\Common.php"/>
<filterchain>
<replacetokens begintoken="##" endtoken="##">
<token key="prj.identkey" value="${prj.identkey}" />
<token key="prj.name" value="${prj.name}" />
<token key="prj.ver" value="##${prj.ver}##" />
<token key="year" value="${YEAR}" />
</replacetokens>
</filterchain>
</reflexive>
</target>
<target name="styles">
<echo msg="Building SCSS Styles..." />
<!--<exec command="vendor\bin\pscss -f=expanded < src-webui\styles\AetherStyle.scss" passthru="true" checkreturn="true" />-->
<exec command="sassc --style expanded --line-comments --sourcemap ${styles.srcfile} ${styles.destfile}" passthru="true" checkreturn="true" />
</target>
<target name="uascript">
<echo msg="Building TypeScipt Sources..." />
<exec command="tsc --project ${uascript.srcpath}" checkreturn="true" passthru="true" />
</target>
<!-- ============================================ -->
<!-- Target: (DEFAULT) build -->
<!-- ============================================ -->
<target name="build" depends="prepare, styles, uascript">
<echo msg="Building Phar..." />
<mkdir dir="build" />
<!--<php expression="ini_set('phar.readonly', 'Off');">-->
<!--<php expression="ini_get('phar.readonly');" returnProperty="PharDisabled"/>-->
<exec command="box build -v" passthru="true" />
<copy file="${prj.identkey}.phar" todir="build" />
<copy file="${prj.identkey}.phar.pubkey" todir="build" />
</target>
<!-- ============================================ -->
<!-- Target: build-docs -->
<!-- ============================================ -->
<target name="docs" depends="prepare">
<echo msg="Creating Docs\API ..." />
<apigen source="src,vendor" destination="docs/api"
title="${prj.name} (prj.ver+${svnParentDir}) API Docs"
sourcecode="no" exclude="*/tests/*,*/Tests/*,*/Self-Test/*"
debug="true"/>
<!-- @todo gen sphinx docs if applicable -->
</target>
<!-- ============================================ -->
<!-- Target: prepare-dist -->
<!-- ============================================ -->
<target name="prepare-dist" depends="docs, build">
<version releasetype="Bugfix" file="version.txt" property="prj.ver"/>
</target>
<!-- ============================================ -->
<!-- Target: dist-phar (Phar Only) -->
<!-- ============================================ -->
<target name="dist-phar" depends="prepare-dist">
<echo msg="Creating archive..." />
<zip destfile="./build/${prj.identkey}-phar_${prj.ver}+${DSTAMP}${TSTAMP}.zip">
<fileset dir=".">
<include name="${prj.identkey}.phar" />
<include name="${prj.identkey}.phar.pubkey" />
</fileset>
</zip>
<echo msg="Files copied and compressed in build directory OK!" />
</target>
<!-- ============================================ -->
<!-- Target: dist-full (FULL dir structure) -->
<!-- ============================================ -->
<target name="dist-full" depends="prepare-dist">
<echo msg="Creating archive..." />
<zip destfile="./build/${prj.identkey}-full_${prj.ver}+${DSTAMP}${TSTAMP}.zip">
<fileset dir=".">
<include name="${prj.identkey}.phar" />
<include name="${prj.identkey}.phar.pubkey" />
<include name="${prj.identkey}.conf" />
<include name="libs/" />
<include name="etc/" />
<include name="docs/" />
</fileset>
</zip>
<echo msg="Files copied and compressed in build directory OK!" />
</target>
</project>