-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.xml
36 lines (31 loc) · 1.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
<project name = "Rweixin" default = "install" basedir = ".">
<property environment = "env" />
<property name = "package.name" value = "Rweixin" />
<property name = "r.home" value = "D:/Software/R/R-3.5.3" />
<property name = "rtools.home" value = "C:/Rtools" />
<property name = "path" value = "${r.home}/bin;${rtools.home}/bin;"/>
<property name = "output.folder" value = "${basedir}/output/"/>
<target name="clean">
<delete dir="${output.folder}" failonerror = "false"/>
<mkdir dir="${output.folder}/${package.name}"/>
<copy todir="${output.folder}/${package.name}">
<fileset dir="${basedir}">
<include name="**"/>
</fileset>
</copy>
</target>
<target name ="build" depends="clean">
<exec executable="${r.home}/bin/R" dir ="${output.folder}" failonerror = "true">
<env key="Path" value="${path}"/>
<arg value="CMD"/>
<arg line ='build ${package.name}'/>
</exec>
</target>
<target name ='install' depends ='build'>
<exec executable="${r.home}/bin/R" dir ="${output.folder}" failonerror = "true">
<env key="Path" value="${path}"/>
<arg value="CMD"/>
<arg line ='INSTALL --build ${package.name}'/>
</exec>
</target>
</project>