Skip to content

Commit

Permalink
fix: CLI option names for uploader
Browse files Browse the repository at this point in the history
Only single character aliases can be specified with a single dash (-).
  • Loading branch information
kleisauke committed May 4, 2023
1 parent b4dfea7 commit 315e747
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 38 deletions.
22 changes: 11 additions & 11 deletions dist/index.js
Expand Up @@ -22176,7 +22176,7 @@ const buildExec = () => {
});
}
if (fullReport) {
execArgs.push('-full', `${fullReport}`);
execArgs.push('--full', `${fullReport}`);
}
if (flags) {
flags.split(',').map((f) => f.trim()).forEach((f) => {
Expand All @@ -22187,22 +22187,22 @@ const buildExec = () => {
execArgs.push('-g');
}
if (gcovArgs) {
execArgs.push('-gcovArgs', `${gcovArgs}`);
execArgs.push('--ga', `${gcovArgs}`);
}
if (gcovIgnore) {
execArgs.push('-gcovIgnore', `${gcovIgnore}`);
execArgs.push('--gi', `${gcovIgnore}`);
}
if (gcovInclude) {
execArgs.push('-gcovInclude', `${gcovInclude}`);
execArgs.push('--gI', `${gcovInclude}`);
}
if (gcovExecutable) {
execArgs.push('-gcovExecutable', `${gcovExecutable}`);
execArgs.push('--gx', `${gcovExecutable}`);
}
if (networkFilter) {
execArgs.push('-networkFilter', `${networkFilter}`);
execArgs.push('-i', `${networkFilter}`);
}
if (networkPrefix) {
execArgs.push('-networkPrefix', `${networkPrefix}`);
execArgs.push('-k', `${networkPrefix}`);
}
if (overrideBranch) {
execArgs.push('-B', `${overrideBranch}`);
Expand Down Expand Up @@ -22236,10 +22236,10 @@ const buildExec = () => {
execArgs.push('-r', `${slug}`);
}
if (swift) {
execArgs.push('-xs');
execArgs.push('--xs');
}
if (swift && swiftProject) {
execArgs.push('-xsp', `${swiftProject}`);
execArgs.push('--xsp', `${swiftProject}`);
}
if (upstream) {
execArgs.push('-U', `${upstream}`);
Expand All @@ -22251,8 +22251,8 @@ const buildExec = () => {
execArgs.push('-v');
}
if (xcode && xcodeArchivePath) {
execArgs.push('-xc');
execArgs.push('-xp', `${xcodeArchivePath}`);
execArgs.push('--xc');
execArgs.push('--xp', `${xcodeArchivePath}`);
}
if (uploaderVersion == '') {
uploaderVersion = 'latest';
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

29 changes: 14 additions & 15 deletions src/buildExec.test.ts
Expand Up @@ -33,8 +33,7 @@ test('all arguments', () => {
'file': 'coverage.xml',
'files': 'dir1/coverage.xml,dir2/coverage.xml',
'flags': 'test,test2',
'functionalities':
'network',
'functionalities': 'network',
'full_report': 'oldDir/oldReport.json',
'gcov': 'true',
'gcov_args': '-v',
Expand All @@ -60,7 +59,7 @@ test('all arguments', () => {
'verbose': 't',
'xcode': 'true',
'xcode_archive_path': '/test.xcresult',
'xtra_args': '-some -other -args',
'xtra_args': '--some --other --args',
};

for (const env of Object.keys(envs)) {
Expand Down Expand Up @@ -88,24 +87,24 @@ test('all arguments', () => {
'dir1/coverage.xml',
'-f',
'dir2/coverage.xml',
'-full',
'--full',
'oldDir/oldReport.json',
'-F',
'test',
'-F',
'test2',
'-g',
'-gcovArgs',
'--ga',
'-v',
'-gcovIgnore',
'--gi',
'*.fake',
'-gcovInclude',
'--gI',
'real_file',
'-gcovExecutable',
'--gx',
'gcov2',
'-networkFilter',
'-i',
'src/',
'-networkPrefix',
'-k',
'build/',
'-B',
'thomasrockhu/test',
Expand All @@ -123,18 +122,18 @@ test('all arguments', () => {
'coverage/',
'-r',
'fakeOwner/fakeRepo',
'-xs',
'-xsp',
'--xs',
'--xsp',
'MyApp',
'-U',
'https://codecov.example.com',
'-u',
'https://codecov.enterprise.com',
'-v',
'-xc',
'-xp',
'--xc',
'--xp',
'/test.xcresult',
'-some -other -args',
'--some --other --args',
]);
expect(failCi).toBeTruthy();

Expand Down
22 changes: 11 additions & 11 deletions src/buildExec.ts
Expand Up @@ -115,7 +115,7 @@ const buildExec = () => {
});
}
if (fullReport) {
execArgs.push('-full', `${fullReport}`);
execArgs.push('--full', `${fullReport}`);
}
if (flags) {
flags.split(',').map((f) => f.trim()).forEach((f) => {
Expand All @@ -127,23 +127,23 @@ const buildExec = () => {
execArgs.push('-g');
}
if (gcovArgs) {
execArgs.push('-gcovArgs', `${gcovArgs}`);
execArgs.push('--ga', `${gcovArgs}`);
}
if (gcovIgnore) {
execArgs.push('-gcovIgnore', `${gcovIgnore}`);
execArgs.push('--gi', `${gcovIgnore}`);
}
if (gcovInclude) {
execArgs.push('-gcovInclude', `${gcovInclude}`);
execArgs.push('--gI', `${gcovInclude}`);
}
if (gcovExecutable) {
execArgs.push('-gcovExecutable', `${gcovExecutable}`);
execArgs.push('--gx', `${gcovExecutable}`);
}

if (networkFilter) {
execArgs.push('-networkFilter', `${networkFilter}`);
execArgs.push('-i', `${networkFilter}`);
}
if (networkPrefix) {
execArgs.push('-networkPrefix', `${networkPrefix}`);
execArgs.push('-k', `${networkPrefix}`);
}

if (overrideBranch) {
Expand Down Expand Up @@ -180,10 +180,10 @@ const buildExec = () => {
execArgs.push('-r', `${slug}`);
}
if (swift) {
execArgs.push('-xs');
execArgs.push('--xs');
}
if (swift && swiftProject) {
execArgs.push('-xsp', `${swiftProject}`);
execArgs.push('--xsp', `${swiftProject}`);
}
if (upstream) {
execArgs.push('-U', `${upstream}`);
Expand All @@ -195,8 +195,8 @@ const buildExec = () => {
execArgs.push('-v');
}
if (xcode && xcodeArchivePath) {
execArgs.push('-xc');
execArgs.push('-xp', `${xcodeArchivePath}`);
execArgs.push('--xc');
execArgs.push('--xp', `${xcodeArchivePath}`);
}

if (uploaderVersion == '') {
Expand Down

0 comments on commit 315e747

Please sign in to comment.