|
154 | 154 | (let [new-content (string/replace content match replacement)]
|
155 | 155 | (if (= new-content content)
|
156 | 156 | (throw (ex-info (format "hacking file failed: %s" fname) {}))
|
157 |
| - (spit fname new-content))) |
158 |
| - (status/line :detail (format "-> here's the diff for %s" fname)) |
159 |
| - (shcmd-no-exit ["git" "--no-pager" "diff" "--no-index" orig-filename fname]))) |
| 157 | + (spit fname new-content))))) |
| 158 | + |
| 159 | +(defn- show-patch-diff [{:keys [home-dir]}] |
| 160 | + (shcmd-no-exit ["git" "--no-pager" "diff"] {:dir home-dir})) |
160 | 161 |
|
161 | 162 | ;;
|
162 | 163 | ;; carve
|
|
299 | 300 | (str (subs content 0 ndx)
|
300 | 301 | replace-str
|
301 | 302 | (subs content (+ ndx (count find-str)))))
|
302 |
| - (throw (ex-info "hacking zprint failed" {}))) |
303 |
| - (status/line :detail (format "-> here's the diff for %s" src-filename)) |
304 |
| - (shcmd-no-exit ["git" "--no-pager" "diff" "--no-index" orig-filename src-filename]))) |
| 303 | + (throw (ex-info "hacking zprint failed" {}))))) |
305 | 304 |
|
306 | 305 | (defn- zprint-prep [{:keys [target-root-dir home-dir]}]
|
307 | 306 | (status/line :detail "=> Installing not-yet-released expectations/cljc-test")
|
|
466 | 465 | lib (assoc lib :home-dir home-dir)]
|
467 | 466 | (status/line :detail "git init-ing target, some libs expect that they were cloned")
|
468 | 467 | (shcmd ["git" "init"] {:dir home-dir})
|
| 468 | + (status/line :detail "git adding, so that we can easily show effect of our patches later") |
| 469 | + (shcmd ["git" "add" "."] {:dir home-dir}) |
469 | 470 |
|
470 | 471 | (when patch-fn
|
471 | 472 | (status/line :info (format "%s: Patching" name))
|
|
475 | 476 | (prep-fn lib))
|
476 | 477 | (when (not show-deps-fn)
|
477 | 478 | (throw (ex-info (format "missing show-deps-fn for %s" name) {})))
|
| 479 | + (status/line :info (format "%s: Effect of our patches" name)) |
| 480 | + (show-patch-diff lib) |
478 | 481 | (status/line :info (format "%s: Deps report" name))
|
479 | 482 | (show-deps-fn lib)
|
480 | 483 | (when-not test-cmds
|
|
0 commit comments