Fork me on GitHub
#cljdoc
<
2019-05-26
>
borkdude09:05:10

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 <[email protected]>
Date:   Sun May 26 11:33:03 2019 +0200

    cljdoc

commit 0435ea79d4fd42b74226b1a374838133a96f68ed (origin/master, origin/HEAD)
Author: Michiel Borkent <[email protected]>
Date:   Sat May 25 21:58:23 2019 +0200

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

martinklepsch09:05:13

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

borkdude09:05:21

adding --rev HEAD works…

martinklepsch09:05:33

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

borkdude09:05:40

thanks 🙂

martinklepsch09:05:07

You’re welcome!

borkdude09:05:28

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

martinklepsch09:05:59

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

borkdude09:05:48

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

borkdude10:05:03

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?