mirror of
https://github.com/actions/setup-python.git
synced 2025-07-02 23:53:47 +00:00
Revert poetry and pipenv changes
This commit is contained in:
parent
f8a2339550
commit
a0c296a502
3 changed files with 9 additions and 42 deletions
|
@ -2,7 +2,6 @@ import * as glob from '@actions/glob';
|
|||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import * as core from '@actions/core';
|
||||
import {getLinuxOSReleaseInfo, IS_LINUX} from '../utils';
|
||||
|
||||
import CacheDistributor from './cache-distributor';
|
||||
|
||||
|
@ -32,17 +31,9 @@ class PipenvCache extends CacheDistributor {
|
|||
}
|
||||
|
||||
protected async computeKeys() {
|
||||
const hash = await glob.hashFiles(this.cacheDependencyPath);
|
||||
let primaryKey = '';
|
||||
const hash = await glob.hashFiles(this.patterns);
|
||||
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
|
||||
const restoreKey = undefined;
|
||||
|
||||
if (IS_LINUX) {
|
||||
const osRelease = await getLinuxOSReleaseInfo();
|
||||
primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${osRelease}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
|
||||
} else {
|
||||
primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
|
||||
}
|
||||
|
||||
return {
|
||||
primaryKey,
|
||||
restoreKey
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as glob from '@actions/glob';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import * as exec from '@actions/exec';
|
||||
import {getLinuxOSReleaseInfo, IS_LINUX} from '../utils';
|
||||
|
||||
import CacheDistributor from './cache-distributor';
|
||||
|
||||
|
@ -32,17 +32,9 @@ class PoetryCache extends CacheDistributor {
|
|||
}
|
||||
|
||||
protected async computeKeys() {
|
||||
const hash = await glob.hashFiles(this.cacheDependencyPath);
|
||||
let primaryKey = '';
|
||||
const hash = await glob.hashFiles(this.patterns);
|
||||
const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
|
||||
const restoreKey = undefined;
|
||||
|
||||
if (IS_LINUX) {
|
||||
const osRelease = await getLinuxOSReleaseInfo();
|
||||
primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${osRelease}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
|
||||
} else {
|
||||
primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-python-${this.pythonVersion}-${this.packageManager}-${hash}`;
|
||||
}
|
||||
|
||||
return {
|
||||
primaryKey,
|
||||
restoreKey
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue