Explorar el Código

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 hace 12 años
padre
commit
8ead9ecafd
Se han modificado 3 ficheros con 5 adiciones y 16 borrados
  1. 5
    16
      build.xml
  2. BIN
      lib/jgit-describe.jar
  3. BIN
      lib/org.eclipse.jgit-1.3.0-SNAPSHOT.jar

+ 5
- 16
build.xml Ver fichero

16
         <fileset dir="${util.lib}" includes="*.jar"/>
16
         <fileset dir="${util.lib}" includes="*.jar"/>
17
     </path>
17
     </path>
18
 
18
 
19
+    <taskdef name="git-describe" classname="org.mdonoughe.JGitDescribeTask" classpathref="util.classpath.test"/>
20
+
19
     <target name="-init-compile">
21
     <target name="-init-compile">
20
        <mkdir dir="${util.build.main}"/>
22
        <mkdir dir="${util.build.main}"/>
21
     </target>
23
     </target>
33
     </target>
35
     </target>
34
 
36
 
35
     <target name="-retrieve-versions">
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
     </target>
39
     </target>
51
 
40
 
52
     <target name="compile" depends="-init-compile">
41
     <target name="compile" depends="-init-compile">
53
        <javac srcdir="${util.src}" destdir="${util.build.main}"
42
        <javac srcdir="${util.src}" destdir="${util.build.main}"
54
-              includeantruntime="false"/> 
43
+              includeantruntime="false"/>
55
     </target>
44
     </target>
56
 
45
 
57
     <target name="compile-tests" depends="compile,-init-compile-tests">
46
     <target name="compile-tests" depends="compile,-init-compile-tests">
71
           <classpath>
60
           <classpath>
72
              <path refid="util.classpath.test"/>
61
              <path refid="util.classpath.test"/>
73
              <pathelement location="${util.build.test}"/>
62
              <pathelement location="${util.build.test}"/>
74
-          </classpath> 
63
+          </classpath>
75
           <batchtest todir="${util.reports}">
64
           <batchtest todir="${util.reports}">
76
              <fileset dir="${util.build.test}" includes="**/*Test.class"/>
65
              <fileset dir="${util.build.test}" includes="**/*Test.class"/>
77
              <formatter type="xml"/>
66
              <formatter type="xml"/>

BIN
lib/jgit-describe.jar Ver fichero


BIN
lib/org.eclipse.jgit-1.3.0-SNAPSHOT.jar Ver fichero


Loading…
Cancelar
Guardar