Skip to content

Commit

Permalink
simpler version-fn
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenet committed Jul 18, 2024
1 parent 6738ddb commit 83f0c2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/exoscale/tools/project/api/version.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
[clojure.tools.deps.alpha.util.dir :as td]
[exoscale.deps-version :as version]))

(defn run-version-fn [version-fn]
(when-let [f (requiring-resolve version-fn)]
(f)))

(defn get-version
[{:as _opts :exoscale.project/keys [version-file version]}]
[{:as _opts :exoscale.project/keys [version-file version-fn version]}]
(or version
(some-> version-file version/read-version-file*)))
(some-> version-file version/read-version-file*)
(qualified-ident? version-fn) (run-version-fn version-fn)))

(defn remove-snapshot
[{:as _opts
Expand Down
1 change: 0 additions & 1 deletion src/exoscale/tools/project/standalone.clj
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@

(defn assoc-version
[{:as opts :exoscale.project/keys [version-file]}]

(let [v (version/read-version-file* version-file)]
(cond-> opts
(some? v)
Expand Down

0 comments on commit 83f0c2d

Please sign in to comment.