5
0
mirror of https://github.com/astral-sh/setup-uv.git synced 2025-12-23 11:01:03 +00:00

Purge cache in cache key (#423)

Fixes: #416
This commit is contained in:
Kevin Stillhammer
2025-05-23 09:43:52 +02:00
committed by GitHub
parent b3d7ca7ac0
commit e3d2ea5ff3
4 changed files with 10 additions and 16 deletions

View File

@@ -4,6 +4,7 @@ import {
cacheDependencyGlob,
cacheLocalPath,
cacheSuffix,
pruneCache,
pythonVersion as pythonVersionInput,
workingDirectory,
} from "../utils/inputs";
@@ -55,7 +56,8 @@ async function computeKeys(): Promise<string> {
const suffix = cacheSuffix ? `-${cacheSuffix}` : "";
const pythonVersion = await getPythonVersion();
const platform = await getPlatform();
return `setup-uv-${CACHE_VERSION}-${getArch()}-${platform}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
const pruned = pruneCache ? "-pruned" : "";
return `setup-uv-${CACHE_VERSION}-${getArch()}-${platform}-${pythonVersion}${pruned}${cacheDependencyPathHash}${suffix}`;
}
async function getPythonVersion(): Promise<string> {