forked from bcchapman/tcx-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
57 lines (42 loc) · 2 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
<project name="tcx-js" default="backup" basedir=".">
<description>
Ant script to create a zip file backup of this project.
Chris Joakim, 2014/11/08
</description>
<!-- These are the only properties you should have to change. -->
<property name="_projectRoot" value="/Users/cjoakim/github/" />
<property name="_projectName" value="tcx-js" />
<property name="_backupRoot" value="/Backups/projects/" />
<!-- These properties are derived from the above. -->
<property name="_projectDir" value="${_projectRoot}${_projectName}" />
<property name="_backupDir" value="${_backupRoot}/${_projectName}" />
<!-- ******************************************************************* -->
<target name="echoProperties">
<description>
This step simply displays the properties defined above.
</description>
<echo message="Properties used in this script:" />
<echo message="projectRoot... ${_projectRoot}" />
<echo message="projectName... ${_projectName}" />
<echo message="backupRoot.... ${_backupRoot}" />
<echo message="projectDir.... ${_projectDir}" />
<echo message="backupDir..... ${_backupDir}" />
</target>
<!-- ******************************************************************* -->
<target name="backup" depends="echoProperties" >
<description>
Create the backup zip file.
</description>
<tstamp>
<format property="_backupTstamp" pattern="yyyyMMdd_HHmm" />
</tstamp>
<property name="_zipFilename" value="${_backupDir}/${_projectName}-${_backupTstamp}.zip" />
<mkdir dir="${_backupRoot}" />
<mkdir dir="${_backupDir}" />
<delete file="${_zipFilename}" />
<zip zipfile="${_zipFilename}"
basedir="${_projectDir}"
excludes=".git/, .idea/, node_modules/, log/, tmp/, **/txt_merged.txt, **/*.gz, **/*.zip" />
<echo message="done" />
</target>
</project>