Skip to content

Commit

Permalink
Add -E,--exclusions boot option -- fixes #472
Browse files Browse the repository at this point in the history
  • Loading branch information
micha committed Jul 31, 2016
1 parent be5c751 commit 45c5fdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- Added `-f, --file` — evaluates the contents of a file just like with
the shebang script, but easier to use on platforms like Windows that don't
have great shebang support [#465][465].
- Added `-E, --exclusions` — adds symbol to env `:exclusions` [#472][472].
- Removed `-t, --target-path` and `-T, --no-target` [#475][475].

##### Task Options
Expand All @@ -54,6 +55,7 @@ N/A
[465]: https://github.com/boot-clj/boot/issues/465
[469]: https://github.com/boot-clj/boot/issues/469
[471]: https://github.com/boot-clj/boot/issues/471
[472]: https://github.com/boot-clj/boot/issues/472
[475]: https://github.com/boot-clj/boot/issues/475
[476]: https://github.com/boot-clj/boot/issues/476
[477]: https://github.com/boot-clj/boot/issues/477
Expand Down
4 changes: 3 additions & 1 deletion boot/core/src/boot/main.clj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
:assoc-fn #(let [[p v] (string/split %3 #":" 2)]
(update-in %1 [%2] (fnil conj [])
(pod/canonical-coord [(read-string p) (or v "RELEASE")])))]
["-E" "--exclusions SYM" "Add the SYM dependency to the set of global exclusions."
:assoc-fn #(update-in %1 [%2] (fnil conj #{}) (symbol %3))]
["-e" "--set-env KEY=VAL" "Add KEY => VAL to project env map."
:assoc-fn #(let [[k v] (string/split %3 #"=" 2)]
(update-in %1 [%2] (fnil assoc {}) (keyword k) v))]
Expand Down Expand Up @@ -176,7 +178,7 @@
localforms (when profile?
(some->> localscript slurp util/read-string-all))
initial-env (->> [:source-paths :resource-paths :asset-paths
:target-path :dependencies :checkouts :offline?]
:dependencies :exclusions :checkouts :offline?]
(reduce #(if-let [v (opts %2)] (assoc %1 %2 v) %1) {})
(merge {} (:set-env opts)))
import-ns (export-task-namespaces initial-env)
Expand Down

2 comments on commit 45c5fdf

@arichiardi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Micha!

@micha
Copy link
Contributor Author

@micha micha commented on 45c5fdf Jul 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost ready for a release...

Please sign in to comment.