diff --git a/src/exoscale/tools/project/api/version.clj b/src/exoscale/tools/project/api/version.clj index fee966c..8b4a30f 100644 --- a/src/exoscale/tools/project/api/version.clj +++ b/src/exoscale/tools/project/api/version.clj @@ -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 diff --git a/src/exoscale/tools/project/standalone.clj b/src/exoscale/tools/project/standalone.clj index cabd70c..83e2461 100644 --- a/src/exoscale/tools/project/standalone.clj +++ b/src/exoscale/tools/project/standalone.clj @@ -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)