Skip to content

Commit

Permalink
fix: force version (#1329)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu-codecov committed Mar 19, 2024
1 parent 251ba34 commit 4621ecc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 2 additions & 4 deletions dist/index.js
Expand Up @@ -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* () {
if (version) {
core.info(`==> Running version ${version}`);
}
core.info(`==> Running version ${version}`);
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' },
});
const metadata = yield metadataRes.body.json();
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions src/version.ts
Expand Up @@ -3,14 +3,12 @@ import {request} from 'undici';

const versionInfo = async (
platform: string,
version?: string,
version: string,
): Promise<void> => {
if (version) {
core.info(`==> Running version ${version}`);
}
core.info(`==> Running version ${version}`);

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'},
});
const metadata = await metadataRes.body.json();
Expand Down

0 comments on commit 4621ecc

Please sign in to comment.