Skip to content
Browse files

copy versioned jars to unversioned on build, patch from

laurent.petit
made :major :minor :incremental parts of *clojure-version* integers
  • Loading branch information...
1 parent 3548ed6 commit 0467cd7fef326c65d3a73d5eb49fbf62497cb687 @richhickey richhickey committed Apr 28, 2009
Showing with 9 additions and 3 deletions.
  1. +6 −0 build.xml
  2. +3 −3 src/clj/clojure/core.clj
View
6 build.xml
@@ -46,6 +46,9 @@
<filter token="clojure-version" value="${clojure.version.label}"/>
</filterset>
+ <property name="clojure_noversion_jar" location="clojure.jar"/>
+ <property name="slim_noversion_jar" location="clojure-slim.jar"/>
+ <property name="src_noversion_jar" location="clojure-sources.jar"/>
<property name="clojure_jar" location="clojure-${clojure.version.label}.jar"/>
<property name="slim_jar" location="clojure-slim-${clojure.version.label}.jar"/>
<property name="src_jar" location="clojure-sources-${clojure.version.label}.jar"/>
@@ -104,6 +107,7 @@
<attribute name="Class-Path" value="."/>
</manifest>
</jar>
+ <copy file="${clojure_jar}" tofile="${clojure_noversion_jar}" />
</target>
<target name="clojure-slim" depends="compile-java"
@@ -121,6 +125,7 @@
<attribute name="Class-Path" value="."/>
</manifest>
</jar>
+ <copy file="${slim_jar}" tofile="${slim_noversion_jar}" />
</target>
<target name="clojure-sources" depends="init"
@@ -129,6 +134,7 @@
<fileset dir="${cljsrc}"
includes="clojure/version.properties"/>
</jar>
+ <copy file="${src_jar}" tofile="${src_noversion_jar}" />
</target>
<target name="jar" depends="clojure"/>
View
6 src/clj/clojure/core.clj
@@ -4091,9 +4091,9 @@
"clojure/version.properties")
properties (doto (new java.util.Properties) (.load version-stream))
prop (fn [k] (.getProperty properties (str "clojure.version." k)))
- clojure-version {:major (prop "major")
- :minor (prop "minor")
- :incremental (prop "incremental")
+ clojure-version {:major (Integer/valueOf (prop "major"))
+ :minor (Integer/valueOf (prop "minor"))
+ :incremental (Integer/valueOf (prop "incremental"))
:qualifier (prop "qualifier")}]
(def *clojure-version*
(if (not (= (prop "interim") "false"))

0 comments on commit 0467cd7

Please sign in to comment.
Something went wrong with that request. Please try again.