Skip to content

Commit a9e7074

Browse files
committed
chore: add report and flag to codecov command
1 parent c39e7bc commit a9e7074

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/codecov-upload-flags.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@ const pkgsWithFlag = pkgFiles.flat().map((f) => {
3737
'./codecov --verbose',
3838
'upload-coverage',
3939
'--git-service github',
40+
'--plugin gcov', // we don't need xcrun or pycoverage
4041
'--gcov-executable gcov',
4142
'--sha', commitSha,
4243
'--branch', branchName,
44+
'--file', report,
45+
'--flag', flag,
4346
'--dry-run',
4447
].join(' ');
4548
return { name, flag, len: flag.length, path, report, command };
@@ -77,8 +80,8 @@ chmodSync(codecovPath, 0o555);
7780
// Compute the commands to run
7881
for (const pkg of pkgsWithFlag) {
7982
if (existsSync(pkg.report)) {
80-
console.log(`CODECOV: Uploading report of "${pkg.name}" with flag "${pkg.flag}"\n\n`);
81-
const command = pkg.command.replace('<sha>', 'Oxffff').replace('<branch>', 'my-branch');
83+
const command = pkg.command;
84+
console.log(`CODECOV: Uploading report of "${pkg.name}" with flag "${pkg.flag}"\n${command}\n\n`);
8285
execCmd(command);
8386
}
8487
}

0 commit comments

Comments
 (0)