-
Notifications
You must be signed in to change notification settings - Fork 3
/
exec-git.xml
47 lines (40 loc) · 1.19 KB
/
exec-git.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" encoding="UTF-8"?>
<project
name="ant-hology.taskdefs.exec-git"
basedir="."
xmlns:if="ant:if"
xmlns:unless="ant:unless"
>
<dirname property="ant-hology.taskdefs.exec-git.dir" file="${ant.file.ant-hology.taskdefs.exec-git}"/>
<import file="${ant-hology.dir}/commonProperties.xml" unless:set="ant-hology.commonProperties.loaded"/>
<!--Simple wrapper for git command.-->
<macrodef
name="exec-git"
description="A simple wrapper for the git command"
>
<attribute
name="dir"
description="the directory in which the git command will be executed"
/>
<attribute
name="options"
description="options to pass to git executable"
default=""/>
<attribute
name="failonerror"
default="true"
/>
<sequential>
<!--Convert attributes to paths for os-->
<local name="_dir"/>
<property
name="_dir"
location="@{dir}"
/>
<exec executable="git" dir="${_dir}" searchpath="true" failonerror="@{failonerror}">
<arg line="@{options}"/>
</exec>
</sequential>
</macrodef>
<property name="ant-hology.taskdefs.exec-git.loaded" value="true"/>
</project>