Skip to content

Commit

Permalink
Allow compat to work with snapshots
Browse files Browse the repository at this point in the history
Always return true if the user has a SNAPSHOT version of ClojureScript.
  • Loading branch information
levand authored and cemerick committed Jan 15, 2015
1 parent 6c557d2 commit af8cb4f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cljs-compat/src/cljsbuild/compat.clj
Expand Up @@ -18,8 +18,9 @@
(throw (IllegalArgumentException. (str "Unparseable version: " version-string)))))

(defn version-in-range?
[version [low high]]
(let [[version low high] (map parse-version [version low (or high "9.9.9-99999")])]
(and (<= (compare low version) 0)
(<= 0 (compare high version)))))

[version [low high]]
(if (.contains version "SNAPSHOT")
true
(let [[version low high] (map parse-version [version low (or high "9.9.9-99999")])]
(and (<= (compare low version) 0)
(<= 0 (compare high version))))))

0 comments on commit af8cb4f

Please sign in to comment.