mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
fix: force version (#1329)
This commit is contained in:
6
dist/index.js
vendored
6
dist/index.js
vendored
@@ -32718,11 +32718,9 @@ var version_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _
|
|||||||
|
|
||||||
|
|
||||||
const versionInfo = (platform, version) => version_awaiter(void 0, void 0, void 0, function* () {
|
const versionInfo = (platform, version) => version_awaiter(void 0, void 0, void 0, function* () {
|
||||||
if (version) {
|
core.info(`==> Running version ${version}`);
|
||||||
core.info(`==> Running version ${version}`);
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
const metadataRes = yield (0,undici.request)(`https://cli.codecov.io/${platform}/latest`, {
|
const metadataRes = yield (0,undici.request)(`https://cli.codecov.io/${platform}/${version}`, {
|
||||||
headers: { 'Accept': 'application/json' },
|
headers: { 'Accept': 'application/json' },
|
||||||
});
|
});
|
||||||
const metadata = yield metadataRes.body.json();
|
const metadata = yield metadataRes.body.json();
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -3,14 +3,12 @@ import {request} from 'undici';
|
|||||||
|
|
||||||
const versionInfo = async (
|
const versionInfo = async (
|
||||||
platform: string,
|
platform: string,
|
||||||
version?: string,
|
version: string,
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
if (version) {
|
core.info(`==> Running version ${version}`);
|
||||||
core.info(`==> Running version ${version}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const metadataRes = await request(`https://cli.codecov.io/${platform}/latest`, {
|
const metadataRes = await request(`https://cli.codecov.io/${platform}/${version}`, {
|
||||||
headers: {'Accept': 'application/json'},
|
headers: {'Accept': 'application/json'},
|
||||||
});
|
});
|
||||||
const metadata = await metadataRes.body.json();
|
const metadata = await metadataRes.body.json();
|
||||||
|
|||||||
Reference in New Issue
Block a user