-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
47 lines (43 loc) · 1.69 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
<?xml version="1.0"?>
<project name="S60Maps" default="source_zip">
<!-- Properties: -->
<property name="sources_dir" location="sources"/>
<property name="temp_dir" location="${sources_dir}/temp"/>
<property name="temp_repo_dir" location="${temp_dir}/s60-maps"/>
<!-- Targets: -->
<target name="clean">
<delete dir="${temp_dir}"/>
</target>
<target name="source_zip" depends="clean">
<mkdir dir="${sources_dir}"/>
<exec executable="git" dir="${sources_dir}">
<arg value="clone"/>
<arg value="--recurse-submodules"/>
<arg value="git@github.com:artem78/s60-maps.git"/>
<arg value="${temp_repo_dir}"/>
</exec>
<!-- Get latest annotated tag (release) -->
<exec executable="git" outputproperty="tag_name" dir="${temp_repo_dir}">
<arg value="describe"/>
<arg value="--abbrev=0"/>
</exec>
<echo>Latest program version: ${tag_name}</echo>
<exec executable="git" dir="${temp_repo_dir}">
<arg value="checkout"/>
<arg value="${tag_name}"/>
</exec>
<zip destfile="${sources_dir}/S60Maps_full_sources_${tag_name}.zip" basedir="${temp_dir}"
excludes="**/.mailmap" level="9"/><!-- note: git dirs and files will be excluded by default -->
<delete dir="${temp_dir}" />
</target>
<target name="rename_sis">
<property name="sis_dir" location="sis/" />
<exec executable="git" outputproperty="version">
<arg value="describe"/>
<arg value="--dirty"/>
</exec>
<echo>Current version: ${version}</echo>
<copy file="${sis_dir}/S60Maps.sis" tofile="${sis_dir}/S60Maps_${version}.sis" overwrite="true" />
<copy file="${sis_dir}/S60Maps.sisx" tofile="${sis_dir}/S60Maps_${version}.sisx" overwrite="true" />
</target>
</project>