From 4b677dce2438b7466a84baecf89652447d164fdf Mon Sep 17 00:00:00 2001 From: Kevin Stillhammer Date: Sat, 24 Aug 2024 09:23:57 +0200 Subject: [PATCH] Create no-dependency-glob cache key --- dist/save-cache/index.js | 3 +++ dist/setup/index.js | 3 +++ src/cache/restore-cache.ts | 2 ++ 3 files changed, 8 insertions(+) diff --git a/dist/save-cache/index.js b/dist/save-cache/index.js index 5f1f30a..5742afc 100644 --- a/dist/save-cache/index.js +++ b/dist/save-cache/index.js @@ -82827,6 +82827,9 @@ function computeKeys(version) { throw new Error(`No file in ${process.cwd()} matched to [${inputs_1.cacheDependencyGlob}], make sure you have checked out the target repository`); } } + else { + cacheDependencyPathHash += 'no-dependency-glob'; + } const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : ''; return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${(0, platforms_1.getPlatform)()}-${version}${cacheDependencyPathHash}${suffix}`; }); diff --git a/dist/setup/index.js b/dist/setup/index.js index 3c46b40..3a29ce6 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -83724,6 +83724,9 @@ function computeKeys(version) { throw new Error(`No file in ${process.cwd()} matched to [${inputs_1.cacheDependencyGlob}], make sure you have checked out the target repository`); } } + else { + cacheDependencyPathHash += 'no-dependency-glob'; + } const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : ''; return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${(0, platforms_1.getPlatform)()}-${version}${cacheDependencyPathHash}${suffix}`; }); diff --git a/src/cache/restore-cache.ts b/src/cache/restore-cache.ts index 51aeefc..a261c76 100644 --- a/src/cache/restore-cache.ts +++ b/src/cache/restore-cache.ts @@ -40,6 +40,8 @@ async function computeKeys(version: string): Promise { `No file in ${process.cwd()} matched to [${cacheDependencyGlob}], make sure you have checked out the target repository` ) } + } else { + cacheDependencyPathHash += 'no-dependency-glob' } const suffix = cacheSuffix ? `-${cacheSuffix}` : '' return `setup-uv-${CACHE_VERSION}-${getArch()}-${getPlatform()}-${version}${cacheDependencyPathHash}${suffix}`