fix: CLI option names for uploader (#969)

Only single character aliases can be specified with a single dash (-).
This commit is contained in:
Kleis Auke Wolthuizen
2023-05-09 03:57:34 +02:00
committed by GitHub
parent b4dfea724f
commit 1c34415a06
4 changed files with 37 additions and 38 deletions

22
dist/index.js vendored
View File

@@ -22176,7 +22176,7 @@ const buildExec = () => {
}); });
} }
if (fullReport) { if (fullReport) {
execArgs.push('-full', `${fullReport}`); execArgs.push('--full', `${fullReport}`);
} }
if (flags) { if (flags) {
flags.split(',').map((f) => f.trim()).forEach((f) => { flags.split(',').map((f) => f.trim()).forEach((f) => {
@@ -22187,22 +22187,22 @@ const buildExec = () => {
execArgs.push('-g'); execArgs.push('-g');
} }
if (gcovArgs) { if (gcovArgs) {
execArgs.push('-gcovArgs', `${gcovArgs}`); execArgs.push('--ga', `${gcovArgs}`);
} }
if (gcovIgnore) { if (gcovIgnore) {
execArgs.push('-gcovIgnore', `${gcovIgnore}`); execArgs.push('--gi', `${gcovIgnore}`);
} }
if (gcovInclude) { if (gcovInclude) {
execArgs.push('-gcovInclude', `${gcovInclude}`); execArgs.push('--gI', `${gcovInclude}`);
} }
if (gcovExecutable) { if (gcovExecutable) {
execArgs.push('-gcovExecutable', `${gcovExecutable}`); execArgs.push('--gx', `${gcovExecutable}`);
} }
if (networkFilter) { if (networkFilter) {
execArgs.push('-networkFilter', `${networkFilter}`); execArgs.push('-i', `${networkFilter}`);
} }
if (networkPrefix) { if (networkPrefix) {
execArgs.push('-networkPrefix', `${networkPrefix}`); execArgs.push('-k', `${networkPrefix}`);
} }
if (overrideBranch) { if (overrideBranch) {
execArgs.push('-B', `${overrideBranch}`); execArgs.push('-B', `${overrideBranch}`);
@@ -22236,10 +22236,10 @@ const buildExec = () => {
execArgs.push('-r', `${slug}`); execArgs.push('-r', `${slug}`);
} }
if (swift) { if (swift) {
execArgs.push('-xs'); execArgs.push('--xs');
} }
if (swift && swiftProject) { if (swift && swiftProject) {
execArgs.push('-xsp', `${swiftProject}`); execArgs.push('--xsp', `${swiftProject}`);
} }
if (upstream) { if (upstream) {
execArgs.push('-U', `${upstream}`); execArgs.push('-U', `${upstream}`);
@@ -22251,8 +22251,8 @@ const buildExec = () => {
execArgs.push('-v'); execArgs.push('-v');
} }
if (xcode && xcodeArchivePath) { if (xcode && xcodeArchivePath) {
execArgs.push('-xc'); execArgs.push('--xc');
execArgs.push('-xp', `${xcodeArchivePath}`); execArgs.push('--xp', `${xcodeArchivePath}`);
} }
if (uploaderVersion == '') { if (uploaderVersion == '') {
uploaderVersion = 'latest'; uploaderVersion = 'latest';

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@@ -33,8 +33,7 @@ test('all arguments', () => {
'file': 'coverage.xml', 'file': 'coverage.xml',
'files': 'dir1/coverage.xml,dir2/coverage.xml', 'files': 'dir1/coverage.xml,dir2/coverage.xml',
'flags': 'test,test2', 'flags': 'test,test2',
'functionalities': 'functionalities': 'network',
'network',
'full_report': 'oldDir/oldReport.json', 'full_report': 'oldDir/oldReport.json',
'gcov': 'true', 'gcov': 'true',
'gcov_args': '-v', 'gcov_args': '-v',
@@ -60,7 +59,7 @@ test('all arguments', () => {
'verbose': 't', 'verbose': 't',
'xcode': 'true', 'xcode': 'true',
'xcode_archive_path': '/test.xcresult', 'xcode_archive_path': '/test.xcresult',
'xtra_args': '-some -other -args', 'xtra_args': '--some --other --args',
}; };
for (const env of Object.keys(envs)) { for (const env of Object.keys(envs)) {
@@ -88,24 +87,24 @@ test('all arguments', () => {
'dir1/coverage.xml', 'dir1/coverage.xml',
'-f', '-f',
'dir2/coverage.xml', 'dir2/coverage.xml',
'-full', '--full',
'oldDir/oldReport.json', 'oldDir/oldReport.json',
'-F', '-F',
'test', 'test',
'-F', '-F',
'test2', 'test2',
'-g', '-g',
'-gcovArgs', '--ga',
'-v', '-v',
'-gcovIgnore', '--gi',
'*.fake', '*.fake',
'-gcovInclude', '--gI',
'real_file', 'real_file',
'-gcovExecutable', '--gx',
'gcov2', 'gcov2',
'-networkFilter', '-i',
'src/', 'src/',
'-networkPrefix', '-k',
'build/', 'build/',
'-B', '-B',
'thomasrockhu/test', 'thomasrockhu/test',
@@ -123,18 +122,18 @@ test('all arguments', () => {
'coverage/', 'coverage/',
'-r', '-r',
'fakeOwner/fakeRepo', 'fakeOwner/fakeRepo',
'-xs', '--xs',
'-xsp', '--xsp',
'MyApp', 'MyApp',
'-U', '-U',
'https://codecov.example.com', 'https://codecov.example.com',
'-u', '-u',
'https://codecov.enterprise.com', 'https://codecov.enterprise.com',
'-v', '-v',
'-xc', '--xc',
'-xp', '--xp',
'/test.xcresult', '/test.xcresult',
'-some -other -args', '--some --other --args',
]); ]);
expect(failCi).toBeTruthy(); expect(failCi).toBeTruthy();

View File

@@ -115,7 +115,7 @@ const buildExec = () => {
}); });
} }
if (fullReport) { if (fullReport) {
execArgs.push('-full', `${fullReport}`); execArgs.push('--full', `${fullReport}`);
} }
if (flags) { if (flags) {
flags.split(',').map((f) => f.trim()).forEach((f) => { flags.split(',').map((f) => f.trim()).forEach((f) => {
@@ -127,23 +127,23 @@ const buildExec = () => {
execArgs.push('-g'); execArgs.push('-g');
} }
if (gcovArgs) { if (gcovArgs) {
execArgs.push('-gcovArgs', `${gcovArgs}`); execArgs.push('--ga', `${gcovArgs}`);
} }
if (gcovIgnore) { if (gcovIgnore) {
execArgs.push('-gcovIgnore', `${gcovIgnore}`); execArgs.push('--gi', `${gcovIgnore}`);
} }
if (gcovInclude) { if (gcovInclude) {
execArgs.push('-gcovInclude', `${gcovInclude}`); execArgs.push('--gI', `${gcovInclude}`);
} }
if (gcovExecutable) { if (gcovExecutable) {
execArgs.push('-gcovExecutable', `${gcovExecutable}`); execArgs.push('--gx', `${gcovExecutable}`);
} }
if (networkFilter) { if (networkFilter) {
execArgs.push('-networkFilter', `${networkFilter}`); execArgs.push('-i', `${networkFilter}`);
} }
if (networkPrefix) { if (networkPrefix) {
execArgs.push('-networkPrefix', `${networkPrefix}`); execArgs.push('-k', `${networkPrefix}`);
} }
if (overrideBranch) { if (overrideBranch) {
@@ -180,10 +180,10 @@ const buildExec = () => {
execArgs.push('-r', `${slug}`); execArgs.push('-r', `${slug}`);
} }
if (swift) { if (swift) {
execArgs.push('-xs'); execArgs.push('--xs');
} }
if (swift && swiftProject) { if (swift && swiftProject) {
execArgs.push('-xsp', `${swiftProject}`); execArgs.push('--xsp', `${swiftProject}`);
} }
if (upstream) { if (upstream) {
execArgs.push('-U', `${upstream}`); execArgs.push('-U', `${upstream}`);
@@ -195,8 +195,8 @@ const buildExec = () => {
execArgs.push('-v'); execArgs.push('-v');
} }
if (xcode && xcodeArchivePath) { if (xcode && xcodeArchivePath) {
execArgs.push('-xc'); execArgs.push('--xc');
execArgs.push('-xp', `${xcodeArchivePath}`); execArgs.push('--xp', `${xcodeArchivePath}`);
} }
if (uploaderVersion == '') { if (uploaderVersion == '') {