use cli instead of node uploader (#1068)

* use cli instead of node uploader

* changes based on review

* logging out run command
This commit is contained in:
Dana Yaish
2023-09-13 11:39:47 +03:00
committed by GitHub
parent c9e0f0b3cf
commit c9e4b73267
8 changed files with 150 additions and 656 deletions

View File

@@ -1,8 +1,6 @@
import * as core from '@actions/core';
const PLATFORMS = [
'aarch64',
'alpine',
'linux',
'macos',
'windows',
@@ -50,7 +48,17 @@ const getPlatform = (os?: string): string => {
};
const getBaseUrl = (platform: string, version: string): string => {
return `https://uploader.codecov.io/${version}/${platform}/${getUploaderName(platform)}`;
return `https://cli.codecov.io/${version}/${platform}/${getUploaderName(platform)}`;
};
const getCommand = (
filename: string,
generalArgs:string[],
command: string,
): string[] => {
const fullCommand = [filename, ...generalArgs, command];
core.info(`==> Running command '${fullCommand.join(' ')}'`);
return fullCommand;
};
export {
@@ -61,4 +69,5 @@ export {
isValidPlatform,
isWindows,
setFailure,
getCommand,
};