fix #1180: limit bb tasks output to first line of docstring
This commit is contained in:
parent
125e1c1412
commit
83c610ca0f
3 changed files with 7 additions and 3 deletions
|
|
@ -7,6 +7,7 @@ For a list of breaking changes, check [here](#breaking-changes).
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|
||||||
- [#1181](https://github.com/babashka/babashka/issues/1181): clojure.test report does not respect *test-out* correctly
|
- [#1181](https://github.com/babashka/babashka/issues/1181): clojure.test report does not respect *test-out* correctly
|
||||||
|
- [#1180](https://github.com/babashka/babashka/issues/1180): limit bb tasks output to first line of docstring
|
||||||
|
|
||||||
## 0.7.5 (2022-02-16)
|
## 0.7.5 (2022-02-16)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
(ns babashka.impl.tasks
|
(ns babashka.impl.tasks
|
||||||
(:require [babashka.deps :as deps]
|
(:require [babashka.deps :as deps]
|
||||||
[babashka.impl.classpath :as cp]
|
|
||||||
[babashka.impl.common :refer [ctx bb-edn debug]]
|
[babashka.impl.common :refer [ctx bb-edn debug]]
|
||||||
[babashka.process :as p]
|
[babashka.process :as p]
|
||||||
[clojure.core.async :refer [<!!]]
|
[clojure.core.async :refer [<!!]]
|
||||||
|
|
@ -421,7 +420,9 @@
|
||||||
:let [task (get tasks (symbol k))]]
|
:let [task (get tasks (symbol k))]]
|
||||||
(println (str (format fmt k)
|
(println (str (format fmt k)
|
||||||
(when-let [d (doc-from-task sci-ctx tasks task)]
|
(when-let [d (doc-from-task sci-ctx tasks task)]
|
||||||
(str " " d))))))
|
(let [first-line (-> (str/split-lines d)
|
||||||
|
first)]
|
||||||
|
(str " " first-line)))))))
|
||||||
(println "No tasks found."))))
|
(println "No tasks found."))))
|
||||||
|
|
||||||
(defn run
|
(defn run
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,9 @@
|
||||||
(test-utils/with-config "{:paths [\"test-resources/task_scripts\"]
|
(test-utils/with-config "{:paths [\"test-resources/task_scripts\"]
|
||||||
:tasks {:requires ([tasks :as t])
|
:tasks {:requires ([tasks :as t])
|
||||||
task1
|
task1
|
||||||
{:doc \"task1 doc\"
|
{:doc \"task1 doc
|
||||||
|
more stuff here
|
||||||
|
even more stuff here\"
|
||||||
:task (+ 1 2 3)}
|
:task (+ 1 2 3)}
|
||||||
task2
|
task2
|
||||||
{:doc \"task2 doc\"
|
{:doc \"task2 doc\"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue