mirror of
https://github.com/actions/setup-python.git
synced 2025-07-05 09:03:46 +00:00
add documentation
This commit is contained in:
parent
73eda7ce1d
commit
87683fb568
3 changed files with 100 additions and 23 deletions
23
dist/setup/index.js
vendored
23
dist/setup/index.js
vendored
|
@ -6633,6 +6633,19 @@ const utils_1 = __webpack_require__(163);
|
|||
function isPyPyVersion(versionSpec) {
|
||||
return versionSpec.startsWith('pypy-');
|
||||
}
|
||||
function cacheDepencies(pythonVersion) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const cache = core.getInput('cache');
|
||||
if (cache) {
|
||||
if (utils_1.isGhes()) {
|
||||
throw new Error('Caching is not supported on GHES');
|
||||
}
|
||||
const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined;
|
||||
const cacheDistributor = yield cache_factory_1.getCacheDistributor(cache, pythonVersion, cacheDependencyPath);
|
||||
yield cacheDistributor.restoreCache();
|
||||
}
|
||||
});
|
||||
}
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
|
@ -6650,15 +6663,7 @@ function run() {
|
|||
pythonVersion = installed.version;
|
||||
core.info(`Successfully setup ${installed.impl} (${pythonVersion})`);
|
||||
}
|
||||
const cache = core.getInput('cache');
|
||||
if (cache) {
|
||||
if (utils_1.isGhes()) {
|
||||
throw new Error('Caching is not supported on GHES');
|
||||
}
|
||||
const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined;
|
||||
const cacheDistributor = yield cache_factory_1.getCacheDistributor(cache, pythonVersion, cacheDependencyPath);
|
||||
yield cacheDistributor.restoreCache();
|
||||
}
|
||||
yield cacheDepencies(pythonVersion);
|
||||
}
|
||||
const matchersPath = path.join(__dirname, '../..', '.github');
|
||||
core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue