Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
Address #1 by adding :scm option
Browse files Browse the repository at this point in the history
  • Loading branch information
seancorfield committed Aug 31, 2021
1 parent f115eb8 commit d096192
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Change Log

* v0.1.1 in progress
* Address #1 by adding `:scm` option; `:tag` will still override `:scm {:tag ...}`.

* v0.1.0 fe2d586 -- 2021-08-27
* Initial release
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ the defaults as follows:
* `:target`, `:class-dir`, `:jar-file`,
* `jar`
* Requires: `:lib` and `:version`,
* `:target`, `:class-dir`, `:basis`, `:src-dirs`, `:tag` (defaults to `(str "v" version)`), `:jar-file`,
* `:target`, `:class-dir`, `:basis`, `:scm`, `:src-dirs`, `:tag` (defaults to `(str "v" version)`), `:jar-file`,
* `run-tests`
* `:aliases` -- for any additional aliases beyond `:test` which is always added,
* Also accepts any options that `run-task` accepts.
Expand Down
7 changes: 4 additions & 3 deletions src/org/corfield/build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
deploy -- req :lib, :version
opt :target, :class-dir, :jar-file
jar -- req :lib, :version
opt :target, :class-dir, :basis, :src-dirs, :tag, :jar-file,
opt :target, :class-dir, :basis, :scm, :src-dirs, :tag, :jar-file,
run-task -- [opts aliases]
opt :java-opts -- defaults to :jvm-opts from aliases
:jvm-opts -- added to :java-opts
Expand Down Expand Up @@ -51,7 +51,7 @@
"Build the library JAR file.
Requires: lib, version"
[{:keys [target class-dir lib version basis src-dirs tag jar-file] :as opts}]
[{:keys [target class-dir lib version basis scm src-dirs tag jar-file] :as opts}]
(assert (and lib version) "lib and version are required for jar")
(let [target (or target default-target)
class-dir (or class-dir (default-class-dir target))
Expand All @@ -63,7 +63,8 @@
(b/write-pom {:class-dir class-dir
:lib lib
:version version
:scm {:tag tag}
:scm (cond-> (or scm {})
tag (assoc :tag tag))
:basis basis
:src-dirs src-dirs})
(println "Copying src...")
Expand Down

0 comments on commit d096192

Please sign in to comment.