|
16 | 16 | (defn published? |
17 | 17 | "A `predicate-fn` designed to be used with [[k16.kmono.core.graph/filter-by]]. |
18 | 18 |
|
19 | | - Checks whether a given `package` has been published to it's maven repository. |
20 | | - The repositories from the packages `:mvn/deps` map will be used to run this |
21 | | - check. |
| 19 | + Checks whether a given `package` has been published to it's maven repository. |
| 20 | + The repositories from the packages `:mvn/deps` map will be used to run this |
| 21 | + check. |
22 | 22 |
|
23 | | - Requires that the package has a `:version` set in order to perform a maven |
24 | | - query. |
| 23 | + Requires that the package has a `:version` set in order to perform a maven |
| 24 | + query. |
25 | 25 |
|
26 | | - This fn will just return `false` if the package `:version` is not set." |
| 26 | + This fn will just return `false` if the package `:version` is not set." |
27 | 27 | [package] |
28 | 28 | (let [local-repo-override (str (fs/create-temp-dir))] |
29 | 29 | (try |
|
49 | 49 | (defn join |
50 | 50 | "Attempt to join together a given a series of paths. |
51 | 51 |
|
52 | | - For example - given `(join \"/a/b/c\" \"../d\")` return `\"/a/b/d\"`" |
| 52 | + For example - given `(join \"/a/b/c\" \"../d\")` return `\"/a/b/d\"`" |
53 | 53 | [& paths] |
54 | 54 | (->> (apply fs/file paths) |
55 | 55 | fs/normalize |
56 | 56 | str)) |
57 | 57 |
|
58 | 58 | (defn create-basis |
59 | 59 | "Constructs a basis using [[clojure.tools.build.api/create-basis]] with a |
60 | | - modified set of `:libs`. |
| 60 | + modified set of `:libs`. |
61 | 61 |
|
62 | 62 | Any `:local/root` kmono dependencies within the resolved basis `:libs` are |
63 | 63 | replaced with their respective `:mvn/version` coordinate by looking up the |
64 | 64 | lib's symbol in the given `packages` map. |
65 | 65 |
|
66 | | - These `:libs` are then used to generate a correctly referenced `pom.xml` when |
67 | | - using [[clojure.tools.build.api/write-pom]]. |
| 66 | + These `:libs` are then used to generate a correctly referenced `pom.xml` when |
| 67 | + using [[clojure.tools.build.api/write-pom]]. |
68 | 68 |
|
69 | 69 | The `packages` map should contain all workspace packages required for version |
70 | 70 | lookup (typically the full unfiltered package map). |
|
99 | 99 | (defn for-each-package |
100 | 100 | "Execute a given `build-fn` for each package in the given `packages` map. |
101 | 101 |
|
102 | | - Accepts an optional `opts` map containing: |
| 102 | + Accepts an optional `opts` map containing: |
103 | 103 |
|
104 | | - - **`:concurrency`** :int (default 4) - The maximum number of packages that |
105 | | - can be executing at a time. |
106 | | - - **`:run-in-order`** :boolean (default `true`) - Set this to false to run |
107 | | - all packages concurrently ignoring their dependency order. |
108 | | - - **`silent`** :boolean (default `false`) - Set this to true to disable |
109 | | - logging the package name and version. |
| 104 | + - **`:concurrency`** :int (default 4) - The maximum number of packages that |
| 105 | + can be executing at a time. |
| 106 | + - **`:run-in-order`** :boolean (default `true`) - Set this to false to run |
| 107 | + all packages concurrently ignoring their dependency order. |
| 108 | + - **`silent`** :boolean (default `false`) - Set this to true to disable |
| 109 | + logging the package name and version. |
110 | 110 |
|
111 | | - The `build-fn` will be called with the `*project-root*` var (from |
112 | | - `clojure.tools.build.api`) bound to the subdirectory of the relevant package. |
113 | | - This allows using the various API's from `tools.build` under the assumption |
114 | | - that all specified paths will be relative to the package subdirectory. |
| 111 | + The `build-fn` will be called with the `*project-root*` var (from |
| 112 | + `clojure.tools.build.api`) bound to the subdirectory of the relevant package. |
| 113 | + This allows using the various API's from `tools.build` under the assumption |
| 114 | + that all specified paths will be relative to the package subdirectory. |
115 | 115 |
|
116 | | - TIP: Use the [[clojure.tools.build.api/resolve-path]] API to resolve a path |
117 | | - relative to the current package dir. |
| 116 | + TIP: Use the [[clojure.tools.build.api/resolve-path]] API to resolve a path |
| 117 | + relative to the current package dir. |
118 | 118 |
|
119 | | - The `build-fn` will be called concurrently (up to max of `:concurrency` or |
120 | | - `4`) but packages with dependencies will only be executed after each of their |
121 | | - respective dependencies have run unless `:run-in-order` is `false`." |
| 119 | + The `build-fn` will be called concurrently (up to max of `:concurrency` or |
| 120 | + `4`) but packages with dependencies will only be executed after each of their |
| 121 | + respective dependencies have run unless `:run-in-order` is `false`." |
122 | 122 | {:style/indent :defn |
123 | 123 | :malli/schema |
124 | 124 | [:function |
|
0 commit comments