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

Commit 87dd246

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 0582042 commit 87dd246

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
@@ -584,6 +584,12 @@ install_dependencies() {
584584
fi
585585
fi
586586

587+
# Clojure CLI
588+
if [ -f deps.edn ]
589+
then
590+
restore_home_cache ".m2" "maven dependencies"
591+
fi
592+
587593
# Hugo
588594
if [ -n "$HUGO_VERSION" ]
589595
then

0 commit comments

Comments
 (0)