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
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
adding --rev HEAD
works…
If you want to override which revision is used you can use —rev; exactly :)
thanks 🙂
You’re welcome!
adding lein install
to my script was the thing I probably forgot 🙂
And if you have any thoughts on how to make that more apparent in the docs, feel free to open more PRs ;)
one thing that could be improved when watching local docs is the links to images be fixed
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?
added