changes based on review

This commit is contained in:
Dana 2023-09-07 13:18:25 +03:00
parent 5dc449765e
commit b396576f86
No known key found for this signature in database
GPG key ID: CE3464681E428690
6 changed files with 14 additions and 13 deletions

View file

@ -8,7 +8,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Upload coverage to Codecov (script)
uses: ./
with:
@ -43,7 +43,7 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Lint

8
dist/index.js vendored
View file

@ -22333,7 +22333,7 @@ const getBaseUrl = (platform, version) => {
return `https://cli.codecov.io/${version}/${platform}/${getUploaderName(platform)}`;
};
const getCommand = (filename, generalArgs, command) => {
return filename + ' ' + generalArgs.join(' ') + ' ' + command;
return [filename, ...generalArgs, command];
};
@ -24637,14 +24637,14 @@ try {
});
};
const doUpload = () => src_awaiter(void 0, void 0, void 0, function* () {
yield exec.exec(getCommand(filename, args, uploadCommand), uploadExecArgs, uploadOptions)
yield exec.exec(getCommand(filename, args, uploadCommand).join(" "), uploadExecArgs, uploadOptions)
.catch((err) => {
setFailure(`Codecov:
Failed to properly upload report: ${err.message}`, failCi);
});
});
const createReport = () => src_awaiter(void 0, void 0, void 0, function* () {
yield exec.exec(getCommand(filename, args, reportCommand), reportExecArgs, reportOptions)
yield exec.exec(getCommand(filename, args, reportCommand).join(" "), reportExecArgs, reportOptions)
.then((exitCode) => src_awaiter(void 0, void 0, void 0, function* () {
if (exitCode == 0) {
yield doUpload();
@ -24654,7 +24654,7 @@ try {
Failed to properly create report: ${err.message}`, failCi);
});
});
yield exec.exec(getCommand(filename, args, commitCommand), commitExecArgs, commitOptions)
yield exec.exec(getCommand(filename, args, commitCommand).join(" "), commitExecArgs, commitOptions)
.then((exitCode) => src_awaiter(void 0, void 0, void 0, function* () {
if (exitCode == 0) {
yield createReport();

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -70,5 +70,5 @@ test('isValidPlatform', () => {
test('getCommand', () => {
expect(getCommand('path', ['-v', '-x'], 'do-upload'))
.toEqual('path -v -x do-upload');
.toEqual(['path', '-v', '-x', 'do-upload']);
});

View file

@ -55,8 +55,8 @@ const getCommand = (
filename: string,
generalArgs:string[],
command: string,
): string => {
return filename + ' ' + generalArgs.join(' ') + ' ' + command;
): string[] => {
return [filename, ...generalArgs, command];
};
export {

View file

@ -67,7 +67,7 @@ try {
});
};
const doUpload = async () => {
await exec.exec(getCommand(filename, args, uploadCommand),
await exec.exec(getCommand(filename, args, uploadCommand).join(' '),
uploadExecArgs,
uploadOptions)
.catch((err) => {
@ -80,7 +80,7 @@ try {
};
const createReport = async () => {
await exec.exec(
getCommand(filename, args, reportCommand),
getCommand(filename, args, reportCommand).join(' '),
reportExecArgs,
reportOptions)
.then(async (exitCode) => {
@ -100,7 +100,8 @@ try {
filename,
args,
commitCommand,
), commitExecArgs, commitOptions)
).join(' '),
commitExecArgs, commitOptions)
.then(async (exitCode) => {
if (exitCode == 0) {
await createReport();