mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 07:22:14 +00:00
Merge 171df76505
into 6ed2c67c8a
This commit is contained in:
commit
6a4015b81a
4 changed files with 21 additions and 0 deletions
9
dist/setup/index.js
vendored
9
dist/setup/index.js
vendored
|
@ -97011,6 +97011,7 @@ const httpm = __importStar(__nccwpck_require__(4844));
|
||||||
const exec = __importStar(__nccwpck_require__(5236));
|
const exec = __importStar(__nccwpck_require__(5236));
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(9896));
|
const fs_1 = __importDefault(__nccwpck_require__(9896));
|
||||||
const utils_1 = __nccwpck_require__(1798);
|
const utils_1 = __nccwpck_require__(1798);
|
||||||
|
const io_util_1 = __nccwpck_require__(5207);
|
||||||
const TOKEN = core.getInput('token');
|
const TOKEN = core.getInput('token');
|
||||||
const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
|
const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
|
||||||
function installGraalPy(graalpyVersion, architecture, allowPreReleases, releases) {
|
function installGraalPy(graalpyVersion, architecture, allowPreReleases, releases) {
|
||||||
|
@ -97039,6 +97040,8 @@ function installGraalPy(graalpyVersion, architecture, allowPreReleases, releases
|
||||||
const graalpyPath = yield tc.downloadTool(downloadUrl, undefined, AUTH);
|
const graalpyPath = yield tc.downloadTool(downloadUrl, undefined, AUTH);
|
||||||
core.info('Extracting downloaded archive...');
|
core.info('Extracting downloaded archive...');
|
||||||
downloadDir = yield tc.extractTar(graalpyPath);
|
downloadDir = yield tc.extractTar(graalpyPath);
|
||||||
|
core.info('Deleting downloaded archive...');
|
||||||
|
yield (0, io_util_1.rm)(graalpyPath);
|
||||||
// root folder in archive can have unpredictable name so just take the first folder
|
// root folder in archive can have unpredictable name so just take the first folder
|
||||||
// downloadDir is unique folder under TEMP and can't contain any other folders
|
// downloadDir is unique folder under TEMP and can't contain any other folders
|
||||||
const archiveName = fs_1.default.readdirSync(downloadDir)[0];
|
const archiveName = fs_1.default.readdirSync(downloadDir)[0];
|
||||||
|
@ -97231,6 +97234,7 @@ const httpm = __importStar(__nccwpck_require__(4844));
|
||||||
const exec = __importStar(__nccwpck_require__(5236));
|
const exec = __importStar(__nccwpck_require__(5236));
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(9896));
|
const fs_1 = __importDefault(__nccwpck_require__(9896));
|
||||||
const utils_1 = __nccwpck_require__(1798);
|
const utils_1 = __nccwpck_require__(1798);
|
||||||
|
const io_util_1 = __nccwpck_require__(5207);
|
||||||
function installPyPy(pypyVersion, pythonVersion, architecture, allowPreReleases, releases) {
|
function installPyPy(pypyVersion, pythonVersion, architecture, allowPreReleases, releases) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
let downloadDir;
|
let downloadDir;
|
||||||
|
@ -97263,6 +97267,8 @@ function installPyPy(pypyVersion, pythonVersion, architecture, allowPreReleases,
|
||||||
else {
|
else {
|
||||||
downloadDir = yield tc.extractTar(pypyPath, undefined, 'x');
|
downloadDir = yield tc.extractTar(pypyPath, undefined, 'x');
|
||||||
}
|
}
|
||||||
|
core.info('Deleting downloaded archive...');
|
||||||
|
yield (0, io_util_1.rm)(pypyPath);
|
||||||
// root folder in archive can have unpredictable name so just take the first folder
|
// root folder in archive can have unpredictable name so just take the first folder
|
||||||
// downloadDir is unique folder under TEMP and can't contain any other folders
|
// downloadDir is unique folder under TEMP and can't contain any other folders
|
||||||
const archiveName = fs_1.default.readdirSync(downloadDir)[0];
|
const archiveName = fs_1.default.readdirSync(downloadDir)[0];
|
||||||
|
@ -97444,6 +97450,7 @@ const core = __importStar(__nccwpck_require__(7484));
|
||||||
const tc = __importStar(__nccwpck_require__(3472));
|
const tc = __importStar(__nccwpck_require__(3472));
|
||||||
const exec = __importStar(__nccwpck_require__(5236));
|
const exec = __importStar(__nccwpck_require__(5236));
|
||||||
const httpm = __importStar(__nccwpck_require__(4844));
|
const httpm = __importStar(__nccwpck_require__(4844));
|
||||||
|
const io_util_1 = __nccwpck_require__(5207);
|
||||||
const utils_1 = __nccwpck_require__(1798);
|
const utils_1 = __nccwpck_require__(1798);
|
||||||
const TOKEN = core.getInput('token');
|
const TOKEN = core.getInput('token');
|
||||||
const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
|
const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
|
||||||
|
@ -97555,6 +97562,8 @@ function installCpythonFromRelease(release) {
|
||||||
else {
|
else {
|
||||||
pythonExtractedFolder = yield tc.extractTar(pythonPath);
|
pythonExtractedFolder = yield tc.extractTar(pythonPath);
|
||||||
}
|
}
|
||||||
|
core.info('Delete downloaded archive');
|
||||||
|
yield (0, io_util_1.rm)(pythonPath);
|
||||||
core.info('Execute installation script');
|
core.info('Execute installation script');
|
||||||
yield installPython(pythonExtractedFolder);
|
yield installPython(pythonExtractedFolder);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ import {
|
||||||
getBinaryDirectory,
|
getBinaryDirectory,
|
||||||
getNextPageUrl
|
getNextPageUrl
|
||||||
} from './utils';
|
} from './utils';
|
||||||
|
import {rm} from '@actions/io/lib/io-util';
|
||||||
|
|
||||||
const TOKEN = core.getInput('token');
|
const TOKEN = core.getInput('token');
|
||||||
const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
|
const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
|
||||||
|
@ -66,6 +67,9 @@ export async function installGraalPy(
|
||||||
core.info('Extracting downloaded archive...');
|
core.info('Extracting downloaded archive...');
|
||||||
downloadDir = await tc.extractTar(graalpyPath);
|
downloadDir = await tc.extractTar(graalpyPath);
|
||||||
|
|
||||||
|
core.info('Deleting downloaded archive...');
|
||||||
|
await rm(graalpyPath);
|
||||||
|
|
||||||
// root folder in archive can have unpredictable name so just take the first folder
|
// root folder in archive can have unpredictable name so just take the first folder
|
||||||
// downloadDir is unique folder under TEMP and can't contain any other folders
|
// downloadDir is unique folder under TEMP and can't contain any other folders
|
||||||
const archiveName = fs.readdirSync(downloadDir)[0];
|
const archiveName = fs.readdirSync(downloadDir)[0];
|
||||||
|
|
|
@ -18,6 +18,7 @@ import {
|
||||||
getBinaryDirectory,
|
getBinaryDirectory,
|
||||||
getDownloadFileName
|
getDownloadFileName
|
||||||
} from './utils';
|
} from './utils';
|
||||||
|
import {rm} from '@actions/io/lib/io-util';
|
||||||
|
|
||||||
export async function installPyPy(
|
export async function installPyPy(
|
||||||
pypyVersion: string,
|
pypyVersion: string,
|
||||||
|
@ -81,6 +82,9 @@ export async function installPyPy(
|
||||||
downloadDir = await tc.extractTar(pypyPath, undefined, 'x');
|
downloadDir = await tc.extractTar(pypyPath, undefined, 'x');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
core.info('Deleting downloaded archive...');
|
||||||
|
await rm(pypyPath);
|
||||||
|
|
||||||
// root folder in archive can have unpredictable name so just take the first folder
|
// root folder in archive can have unpredictable name so just take the first folder
|
||||||
// downloadDir is unique folder under TEMP and can't contain any other folders
|
// downloadDir is unique folder under TEMP and can't contain any other folders
|
||||||
const archiveName = fs.readdirSync(downloadDir)[0];
|
const archiveName = fs.readdirSync(downloadDir)[0];
|
||||||
|
|
|
@ -3,6 +3,7 @@ import * as core from '@actions/core';
|
||||||
import * as tc from '@actions/tool-cache';
|
import * as tc from '@actions/tool-cache';
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
import * as httpm from '@actions/http-client';
|
import * as httpm from '@actions/http-client';
|
||||||
|
import {rm} from '@actions/io/lib/io-util';
|
||||||
import {ExecOptions} from '@actions/exec/lib/interfaces';
|
import {ExecOptions} from '@actions/exec/lib/interfaces';
|
||||||
import {IS_WINDOWS, IS_LINUX, getDownloadFileName} from './utils';
|
import {IS_WINDOWS, IS_LINUX, getDownloadFileName} from './utils';
|
||||||
import {IToolRelease} from '@actions/tool-cache';
|
import {IToolRelease} from '@actions/tool-cache';
|
||||||
|
@ -139,6 +140,9 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) {
|
||||||
pythonExtractedFolder = await tc.extractTar(pythonPath);
|
pythonExtractedFolder = await tc.extractTar(pythonPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
core.info('Delete downloaded archive');
|
||||||
|
await rm(pythonPath);
|
||||||
|
|
||||||
core.info('Execute installation script');
|
core.info('Execute installation script');
|
||||||
await installPython(pythonExtractedFolder);
|
await installPython(pythonExtractedFolder);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue