forked from cbanack/comic-vine-scraper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
68 lines (53 loc) · 2.41 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding = 'utf-8'?>
<!DOCTYPE project>
<project name="Comic Vine Scraper" default="dist" basedir="." >
<description>
A master build file for the 'Comic Vine Scraper' project.
</description>
<!-- Global Properties -->
<property name="build.dir" location="build"/>
<property name="zip.dir" location="${build.dir}/zip"/>
<property name="src.dir" location="src"/>
<!-- =================================
target: dist
================================= -->
<target name="dist" depends="clean"
description="--> Creates the distributable zip file.">
<!-- creates a timestamp to use in the echoed output below -->
<tstamp>
<format property="date" pattern="MMMM-d-yyyy 'at' hh:mm:ss a"/>
</tstamp>
<!-- loads special properties (Version, Name, etc) from package.ini -->
<loadproperties srcFile="${src.dir}/resources/package.ini"/>
<!-- build all the directories we'll need to work with -->
<echo level="info" message="Building '${Name} v${Version}' on ${date}..."/>
<mkdir dir="${build.dir}" />
<mkdir dir="${zip.dir}" />
<!-- copy the entire source directory to the zip dir, flattening it,
and skipping empty directories. -->
<copy todir="${zip.dir}" flatten="true" includeemptydirs="false">
<fileset dir="${src.dir}">
<exclude name="**/__init__.py"/>
<exclude name="**/tests/**"/>
</fileset>
</copy>
<!-- insert the correct version string into the main script file before
it gets zipped up. -->
<replace file="${zip.dir}/resources.py" token="!DEV!"
value="${Version}" />
<!-- zip up the zip dir, thus making a valid ComicRack script package -->
<zip destfile="${build.dir}/ComicVineScraper-${Version}.crplugin"
basedir="${zip.dir}" whenempty="fail"/>
<!-- the zip directory isn't needed anymore, so remove it -->
<delete dir="${zip.dir}" quiet="true"/>
</target>
<!-- =================================
target: clean
================================= -->
<target name="clean"
description="--> Deletes all materials generated by the this build.">
<delete quiet="true" includeemptydirs="true">
<fileset dir="${build.dir}"/>
</delete>
</target>
</project>