Skip to content

Commit

Permalink
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 83f0c2d commit 0e56d93
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
10 changes: 4 additions & 6 deletions src/exoscale/tools/project/api/tasks.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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}]

Expand Down
7 changes: 0 additions & 7 deletions src/exoscale/tools/project/api/version.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
7 changes: 2 additions & 5 deletions src/exoscale/tools/project/standalone.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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))

Expand Down

0 comments on commit 0e56d93

Please sign in to comment.