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

Commit 5acadf8

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 7b53c5f commit 5acadf8

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
@@ -587,6 +587,12 @@ install_dependencies() {
587587
fi
588588
fi
589589

590+
# Clojure CLI
591+
if [ -f deps.edn ]
592+
then
593+
restore_home_cache ".m2" "maven dependencies"
594+
fi
595+
590596
# Hugo
591597
if [ -n "$HUGO_VERSION" ]
592598
then

0 commit comments

Comments
 (0)