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

Commit

Permalink
Fixed issue with option not working
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrenklint committed Dec 11, 2017
1 parent 8acddfe commit 3078f37
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog

## v1.0.1 - 2017-12-12

- Fixed issue with `dir` option not working

## v1.0.0 - 2017-12-11

- Initial release
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -7,7 +7,7 @@ Boot task to execute a shell command, without changing the fileset
)](https://circleci.com/gh/adamrenklint/boot-exec)

```clojure
[adamrenklint/boot-exec "1.0.0"] ;; latest release
[adamrenklint/boot-exec "1.0.1"] ;; latest release
```

## Usage
Expand Down
10 changes: 7 additions & 3 deletions build.boot
@@ -1,5 +1,5 @@
(def project 'adamrenklint/boot-exec)
(def version "1.0.0")
(def version "1.0.1")

(set-env!
:source-paths #{"src"}
Expand All @@ -14,8 +14,11 @@

(bootlaces! version)

(ns-unmap 'boot.user 'test)
(ns-unmap 'boot.user 'format)

(deftask deps [])

(deftask release []
(comp (build-jar)
(push-release)
Expand All @@ -30,8 +33,9 @@
(deftask format []
(fmt))

(deftask echo []
(exec :cmd "echo hello world"))
(deftask test []
(exec :cmd "cat boot_exec.clj"
:dir "src/adamrenklint"))

(task-options!
pom {:project project
Expand Down
4 changes: 3 additions & 1 deletion circle.yml
Expand Up @@ -5,11 +5,13 @@ dependencies:
pre:
- curl -L https://github.com/boot-clj/boot-bin/releases/download/latest/boot.sh -o ~/bin/boot
- chmod +x ~/bin/boot
override:
- boot deps
cache_directories:
- "~/bin"
- "~/.m2"
- "~/.boot/cache/bin"
- "~/.boot/cache/lib"
test:
override:
- boot echo
- boot test
2 changes: 1 addition & 1 deletion src/adamrenklint/boot_exec.clj
Expand Up @@ -13,5 +13,5 @@
(let [pred? (if pred-fn (resolve pred-fn) (fn [] true))]
(core/with-pass-thru _
(when (pred?)
(binding [clojure.java.shell/*sh-dir* (or dir ".")]
(binding [util/*sh-dir* (or dir ".")]
(apply util/dosh (string/split cmd #" ")))))))

0 comments on commit 3078f37

Please sign in to comment.