瀏覽代碼

Don't shell out to git.

Change-Id: I8bc1b5a533e1b074c3cecdce4efeb5fd1609ab6a
Reviewed-on: http://gerrit.dmdirc.com/2300
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.7rc1
Shane Mc Cormack 12 年之前
父節點
當前提交
8ead9ecafd
共有 3 個檔案被更改,包括 5 行新增16 行删除
  1. 5
    16
      build.xml
  2. 二進制
      lib/jgit-describe.jar
  3. 二進制
      lib/org.eclipse.jgit-1.3.0-SNAPSHOT.jar

+ 5
- 16
build.xml 查看文件

@@ -16,6 +16,8 @@
16 16
         <fileset dir="${util.lib}" includes="*.jar"/>
17 17
     </path>
18 18
 
19
+    <taskdef name="git-describe" classname="org.mdonoughe.JGitDescribeTask" classpathref="util.classpath.test"/>
20
+
19 21
     <target name="-init-compile">
20 22
        <mkdir dir="${util.build.main}"/>
21 23
     </target>
@@ -33,25 +35,12 @@
33 35
     </target>
34 36
 
35 37
     <target name="-retrieve-versions">
36
-       <exec executable="git" outputproperty="util.lastcommit.main">
37
-          <arg value="rev-list"/>
38
-          <arg value="--max-count=1"/>
39
-          <arg value="HEAD"/>
40
-          <arg value="--"/>
41
-          <arg value="${util.src}/"/>
42
-       </exec>
43
-
44
-       <exec executable="git" outputproperty="util.version.main">
45
-          <arg value="describe"/>
46
-          <arg value="--tags"/>
47
-          <arg value="--always"/>
48
-          <arg value="${util.lastcommit.main}"/>
49
-       </exec> 
38
+       <git-describe dir=".git" property="util.version.main" subdir="${util.src}" />
50 39
     </target>
51 40
 
52 41
     <target name="compile" depends="-init-compile">
53 42
        <javac srcdir="${util.src}" destdir="${util.build.main}"
54
-              includeantruntime="false"/> 
43
+              includeantruntime="false"/>
55 44
     </target>
56 45
 
57 46
     <target name="compile-tests" depends="compile,-init-compile-tests">
@@ -71,7 +60,7 @@
71 60
           <classpath>
72 61
              <path refid="util.classpath.test"/>
73 62
              <pathelement location="${util.build.test}"/>
74
-          </classpath> 
63
+          </classpath>
75 64
           <batchtest todir="${util.reports}">
76 65
              <fileset dir="${util.build.test}" includes="**/*Test.class"/>
77 66
              <formatter type="xml"/>

二進制
lib/jgit-describe.jar 查看文件


二進制
lib/org.eclipse.jgit-1.3.0-SNAPSHOT.jar 查看文件


Loading…
取消
儲存