mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 15:32:13 +00:00
add a fallback restore-key for poetry cache
This commit is contained in:
parent
6db7460265
commit
19d454babe
3 changed files with 5 additions and 5 deletions
|
@ -300,7 +300,7 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
|
||||||
result = 'pipenv cache is not found';
|
result = 'pipenv cache is not found';
|
||||||
break;
|
break;
|
||||||
case 'poetry':
|
case 'poetry':
|
||||||
result = 'poetry cache is not found';
|
result = `Cache restored from key: ${pipFileLockHash}`;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
dist/setup/index.js
vendored
4
dist/setup/index.js
vendored
|
@ -66750,10 +66750,10 @@ class PoetryCache extends cache_distributor_1.default {
|
||||||
const hash = yield glob.hashFiles(this.patterns);
|
const hash = yield glob.hashFiles(this.patterns);
|
||||||
// "v2" is here to invalidate old caches of this cache distributor, which were created broken:
|
// "v2" is here to invalidate old caches of this cache distributor, which were created broken:
|
||||||
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-v2-${hash}`;
|
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-v2-${hash}`;
|
||||||
const restoreKey = undefined;
|
const restoreKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-v2-`;
|
||||||
return {
|
return {
|
||||||
primaryKey,
|
primaryKey,
|
||||||
restoreKey
|
restoreKey: [restoreKey]
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,10 +48,10 @@ class PoetryCache extends CacheDistributor {
|
||||||
const hash = await glob.hashFiles(this.patterns);
|
const hash = await glob.hashFiles(this.patterns);
|
||||||
// "v2" is here to invalidate old caches of this cache distributor, which were created broken:
|
// "v2" is here to invalidate old caches of this cache distributor, which were created broken:
|
||||||
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-v2-${hash}`;
|
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-v2-${hash}`;
|
||||||
const restoreKey = undefined;
|
const restoreKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-v2-`;
|
||||||
return {
|
return {
|
||||||
primaryKey,
|
primaryKey,
|
||||||
restoreKey
|
restoreKey: [restoreKey]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue