cljdoc

https://cljdoc.org/ & https://github.com/cljdoc/cljdoc
borkdude 2019-05-26T09:45:10.059300Z

hmm, I’m sharing my local git repo into docker like this:

docker run --rm -v "$PWD:/clj-kondo" \
       -v "$HOME/.m2:/root/.m2" -v /tmp/cljdoc:/app/data --entrypoint "clojure" \
       cljdoc/cljdoc -A:cli ingest -p clj-kondo/clj-kondo -v "$version" \
       --jar "/root/.m2/repository/clj-kondo/clj-kondo/$version/clj-kondo-$version.jar" \
       --pom "/root/.m2/repository/clj-kondo/clj-kondo/$version/clj-kondo-$version.pom" \
       --git /clj-kondo
but it checks out the git repo not at the latest commit, which was surprising since I didn’t see any changes I made…
INFO [2019-05-26 09:42:38,773] clojure-agent-send-off-pool-0 - cljdoc.analysis.git Analyzing at revision: 0435ea79d4fd42b74226b1a374838133a96f68ed
INFO [2019-05-26 09:42:38,925] clojure-agent-send-off-pool-0 - cljdoc.server.ingest Importing Articles /clj-kondo 0435ea79d4fd42b74226b1a374838133a96f68ed
git log:
commit 38166354f712bbdc6ed15c635a1c412f8ac8877f (HEAD -> master)
Author: Michiel Borkent <michielborkent@gmail.com>
Date:   Sun May 26 11:33:03 2019 +0200

    cljdoc

commit 0435ea79d4fd42b74226b1a374838133a96f68ed (origin/master, origin/HEAD)
Author: Michiel Borkent <michielborkent@gmail.com>
Date:   Sat May 25 21:58:23 2019 +0200

    error when calling a string, symbol, number, boolean or char as a function

martinklepsch 2019-05-26T09:50:13.061Z

It will try to find a revision that can be tied to the version you’re building, either extracting that from the .pom or via git tags

borkdude 2019-05-26T09:50:21.061500Z

adding --rev HEAD works…

martinklepsch 2019-05-26T09:50:33.061900Z

If you want to override which revision is used you can use —rev; exactly :)

borkdude 2019-05-26T09:50:40.062100Z

thanks 🙂

martinklepsch 2019-05-26T09:51:07.062400Z

You’re welcome!

borkdude 2019-05-26T09:51:28.062800Z

adding lein install to my script was the thing I probably forgot 🙂

martinklepsch 2019-05-26T09:51:59.063700Z

And if you have any thoughts on how to make that more apparent in the docs, feel free to open more PRs ;)

borkdude 2019-05-26T09:56:48.064700Z

one thing that could be improved when watching local docs is the links to images be fixed

borkdude 2019-05-26T10:01:03.065400Z

so, this is the script I needed to preview my cljdocs locally: https://github.com/borkdude/clj-kondo/blob/master/script/cljdoc-preview Maybe I could link to that from the “running locally with Docker” documentation?

borkdude 2019-05-26T10:07:52.065800Z

added