Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit dd94d3c

Browse files
committed
Cache clojure dependencies
This speeds up builds of Clojure repos by avoiding network calls to download dependencies. When a repo has a `deps.edn` file, we assume it is a Clojure repo and would benefit from pre-populating and caching its primary dependencies. Since Clojure dependencies are ultimately stored in the global `.m2` directory, along with other Java dependencies, it suffices to restore `.m2`. The directory is automatically populated during a build performed with the [Clojure CLI tools][clojure-cli]. This extends 52f8eb9, which added support for repos which are built with the Clojure CLI tools. It is similar to f3a4d49 which introduced caching for Leiningen and Boot, two other ways of building Clojure code. [clojure-cli]: https://clojure.org/reference/deps_and_cli
1 parent 2cee85e commit dd94d3c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

run-build-functions.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,12 @@ install_dependencies() {
578578
fi
579579
fi
580580

581+
# Clojure CLI
582+
if [ -f deps.edn ]
583+
then
584+
restore_home_cache ".m2" "maven dependencies"
585+
fi
586+
581587
# Hugo
582588
if [ -n "$HUGO_VERSION" ]
583589
then

0 commit comments

Comments
 (0)