From 0e56d93e2e86f56b728b934d11d0b2d4a7a7d202 Mon Sep 17 00:00:00 2001 From: Max Penet Date: Thu, 18 Jul 2024 14:34:17 +0200 Subject: [PATCH] allow to version with any fn source --- src/exoscale/tools/project/api/tasks.clj | 10 ++++------ src/exoscale/tools/project/api/version.clj | 7 ------- src/exoscale/tools/project/standalone.clj | 7 ++----- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/exoscale/tools/project/api/tasks.clj b/src/exoscale/tools/project/api/tasks.clj index d865ee0..5a9adc5 100644 --- a/src/exoscale/tools/project/api/tasks.clj +++ b/src/exoscale/tools/project/api/tasks.clj @@ -98,15 +98,13 @@ {:run :exoscale.tools.project.standalone/git-commit-version} {:run :exoscale.tools.project.standalone/git-push}] - :release-git-count-revs/single - [{:run :exoscale.tools.project.standalone/version-git-count-revs} - {:run :exoscale.tools.project.standalone/deploy} + :release+tag/single + [{:run :exoscale.tools.project.standalone/deploy} {:run :exoscale.tools.project.standalone/git-tag-version} {:run :exoscale.tools.project.standalone/git-push}] - :release-git-count-revs/modules - [{:run :exoscale.tools.project.standalone/version-git-count-revs} - {:ref :deploy} + :release+tag/modules + [{:ref :deploy} {:run :exoscale.tools.project.standalone/git-tag-version} {:run :exoscale.tools.project.standalone/git-push}] diff --git a/src/exoscale/tools/project/api/version.clj b/src/exoscale/tools/project/api/version.clj index 8b4a30f..ff9a382 100644 --- a/src/exoscale/tools/project/api/version.clj +++ b/src/exoscale/tools/project/api/version.clj @@ -37,10 +37,3 @@ (str/replace (slurp (td/canonicalize (io/file version-template-file))) "GENERATED_VERSION" (b/git-count-revs nil))) - -(defn update-as-git-count-revs - "Updates VERSION file with clojure core libs like version scheme" - [{:as opts :exoscale.project/keys [version-file] - :or {version-file "VERSION"}}] - (spit (td/canonicalize (io/file version-file)) - (git-count-revs opts))) diff --git a/src/exoscale/tools/project/standalone.clj b/src/exoscale/tools/project/standalone.clj index 83e2461..fd42094 100644 --- a/src/exoscale/tools/project/standalone.clj +++ b/src/exoscale/tools/project/standalone.clj @@ -139,11 +139,11 @@ (assoc :id :release/single) (tasks/task opts))) -(defn release-git-count-revs +(defn release+tag [opts] (-> opts into-opts - (assoc :id :release-git-count-revs/single) + (assoc :id :release+tag/single) (tasks/task opts))) (def ^{:arglists '([opts])} version-bump-and-snapshot @@ -152,9 +152,6 @@ (def ^{:arglists '([opts])} version-remove-snapshot (comp v/remove-snapshot into-opts)) -(def ^{:arglists '([opts])} version-git-count-revs - (comp v/update-as-git-count-revs into-opts)) - (def ^{:arglists '([opts])} git-commit-version (comp git/commit-version into-opts))