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

Commit e52a065

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 514911e commit e52a065

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
@@ -581,6 +581,12 @@ install_dependencies() {
581581
fi
582582
fi
583583

584+
# Clojure CLI
585+
if [ -f deps.edn ]
586+
then
587+
restore_home_cache ".m2" "maven dependencies"
588+
fi
589+
584590
# Hugo
585591
if [ -n "$HUGO_VERSION" ]
586592
then

0 commit comments

Comments
 (0)