summaryrefslogtreecommitdiffstats
path: root/make/build-common.xml
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-05-16 03:28:25 +0200
committerSven Gothel <[email protected]>2011-05-16 03:28:25 +0200
commit2f89bf30607281bb8dc0a07b185fa403b9b0f093 (patch)
tree163a5b866d5982a7fb595df2bfdff22c2f11c72e /make/build-common.xml
parentb58d6d6ccf9c622f2377cf6c0c3487a8897aba6d (diff)
build: Query git branch/sha1 and use it if not set and tools are available; Add Java source zip file.
Query git branch/sha1 and use it if not set and tools are available. This shall improve tracking of manual generated binaries/bundles. Add Java source zip file. Contains all Java source code (incl. generated ones) enhancing IDE usage, where API doc and source browsing of libs is supported (NB/Eclipse/etc).
Diffstat (limited to 'make/build-common.xml')
-rw-r--r--make/build-common.xml23
1 files changed, 18 insertions, 5 deletions
diff --git a/make/build-common.xml b/make/build-common.xml
index c2ddae69a..aac3849e0 100644
--- a/make/build-common.xml
+++ b/make/build-common.xml
@@ -45,6 +45,7 @@
<!-- Set the project root directory to be up one directory. -->
<property name="project.root" value=".." />
<property name="build" value="${project.root}/${rootrel.build}" />
+ <property name="tempdir" value="${project.root}/build-temp" />
<property name="src" value="${project.root}/src" />
<property name="lib" value="${build}/lib" />
<property name="jar" value="${build}/jar" />
@@ -63,18 +64,30 @@
<format property="version.timestamp" pattern="yyyyMMdd"/>
</tstamp>
- <property file="${build}/artifact.properties"/>
<property name="jogl.build.number" value="manual"/>
<property name="jogl.build.id" value="${version.timestamp}"/>
- <property name="jogl.build.branch" value="master"/>
- <property name="jogl.build.commit" value="manual"/>
+ <mkdir dir="${tempdir}" />
+ <exec dir="." executable="git" logError="true" failonerror="false" failifexecutionfails="false"
+ output="${tempdir}/localbranch.raw">
+ <arg line="branch --no-color"/>
+ </exec>
+ <exec dir="." executable="sed" logError="true" failonerror="false" failifexecutionfails="false"
+ outputproperty="jogl.build.branch">
+ <arg line="-e '/^[^*]/d' -e 's/* \(.*\)/\1/' ${tempdir}/localbranch.raw"/>
+ </exec>
+ <property name="jogl.build.branch" value="manual"/> <!-- fallback -->
+ <exec dir="${project.root}" executable="git" logError="true" failonerror="false" failifexecutionfails="false"
+ outputproperty="jogl.build.commit">
+ <arg line="rev-parse HEAD"/>
+ </exec>
+ <property name="jogl.build.commit" value="manual"/> <!-- fallback -->
<property name="nativewindow.version" value="${nativewindow_base_version}-b${jogl.build.number}-${version.timestamp}" />
<property name="jogl.version" value="${jogl_base_version}-b${jogl.build.number}-${version.timestamp}" />
<property name="newt.version" value="${newt_base_version}-b${jogl.build.number}-${version.timestamp}" />
- <property name="archive.name" value="jogl-${jogl.version}-${os.and.arch}" />
- <property name="archive" value="${build}/${archive.name}" />
+ <property name="archive.name" value="jogl-${jogl.version}-${os.and.arch}" />
+ <property name="archive" value="${build}/${archive.name}" />
<condition property="setup.nodesktop">
<and>