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

Commit 6ea6bee

Browse files
feat: cache directory for Rust functions (Focal) (#602)
* feat: cache directory for Rust functions * refactor: ensure directory * refactor: revert "ensure directory" * refactor: use separate mkdir call for Rust cache dir
1 parent 653805c commit 6ea6bee

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

run-build-functions.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ mkdir -p $NETLIFY_CACHE_DIR/.bundle
5050
mkdir -p $NETLIFY_CACHE_DIR/bower_components
5151
mkdir -p $NETLIFY_CACHE_DIR/.venv
5252
mkdir -p $NETLIFY_CACHE_DIR/.build
53+
# .netlify/ needs to exist because we may try to copy the Rust functions cache
54+
# to .netlify/rust-functions-cache
55+
mkdir -p $NETLIFY_CACHE_DIR/.netlify
5356
mkdir -p $NETLIFY_CACHE_DIR/.netlify/plugins
5457

5558
# HOME caches
@@ -681,6 +684,7 @@ install_dependencies() {
681684
restore_cwd_cache "target" "rust compile output"
682685
source $HOME/.cargo/env
683686
fi
687+
restore_cwd_cache ".netlify/rust-functions-cache" "Rust functions"
684688
}
685689

686690
#
@@ -697,6 +701,7 @@ cache_artifacts() {
697701
cache_cwd_directory ".venv" "python virtualenv"
698702
cache_cwd_directory ".build" "swift build"
699703
cache_cwd_directory ".netlify/plugins" "build plugins"
704+
cache_cwd_directory ".netlify/rust-functions-cache" "Rust functions"
700705

701706
if [ -f Cargo.toml ] || [ -f Cargo.lock ]
702707
then

0 commit comments

Comments
 (0)