Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! allow to version with any fn source
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenet committed Jul 18, 2024
1 parent bf71629 commit f1230d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/exoscale/tools/project/api/version.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
[clojure.tools.deps.alpha.util.dir :as td]
[exoscale.deps-version :as version]))

(defn run-version-fn [version-fn]
(defn run-version-fn [{:as opts :exoscale.project/keys [version-fn]}]
(when-let [f (requiring-resolve (symbol version-fn))]
(f)))
(f opts)))

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

(defn remove-snapshot
[{:as _opts
Expand Down

0 comments on commit f1230d6

Please sign in to comment.