forked from chocolatey/choco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgemsBuild.step
51 lines (45 loc) · 1.97 KB
/
gemsBuild.step
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
<?xml version="1.0" encoding="utf-8" ?>
<project name="GemsBuild" default="go">
<!-- Project UppercuT - http://projectuppercut.org -->
<!-- DO NOT EDIT THIS FILE - Add custom tasks in BuildTasks.Custom folder with file by the same name - find out more at http://uppercut.pbwiki.com -->
<property name="build.config.settings" value="__NONE__" overwrite="false" />
<include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
<property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" />
<property name="dirs.current.file" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
<include buildfile="${dirs.current.file}${path.separator}default.build.settings" />
<property name="build.step.name" value="${project::get-name()}" />
<property name="build.step.path" value="${project::get-buildfile-path()}" />
<!-- build step customizations below this -->
<property name="fail.build.on.error" value="false" />
<target name="go" depends="run_tasks" if="${run.gems}" />
<!-- run_normal_tasks is called from run_tasks unless replace extension exists-->
<target name="run_normal_tasks"
depends="build_gem, remove_gem_files"
description="Building gems." />
<target name="build_gem">
<echo level="Warning" message="Finding and building all gems in ${dirs.drop.gems}."/>
<foreach item="File" property="spec.file">
<in>
<items>
<include name="${dirs.drop.gems}${path.separator}*.gemspec" />
</items>
</in>
<do>
<exec
program="cmd"
workingdir="${dirs.drop.gems}"
failonerror="false">
<arg value="/c gem build ${spec.file}" />
</exec>
</do>
</foreach>
</target>
<target name="remove_gem_files">
<delete>
<fileset basedir="${dirs.drop.gems}" >
<exclude name="*.gem" />
<include name="**/*" />
</fileset>
</delete>
</target>
</project>