Skip to content

Commit 1c34415

Browse files
authored
fix: CLI option names for uploader (#969)
Only single character aliases can be specified with a single dash (-).
1 parent b4dfea7 commit 1c34415

File tree

4 files changed

+37
-38
lines changed

4 files changed

+37
-38
lines changed

Diff for: dist/index.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -22176,7 +22176,7 @@ const buildExec = () => {
2217622176
});
2217722177
}
2217822178
if (fullReport) {
22179-
execArgs.push('-full', `${fullReport}`);
22179+
execArgs.push('--full', `${fullReport}`);
2218022180
}
2218122181
if (flags) {
2218222182
flags.split(',').map((f) => f.trim()).forEach((f) => {
@@ -22187,22 +22187,22 @@ const buildExec = () => {
2218722187
execArgs.push('-g');
2218822188
}
2218922189
if (gcovArgs) {
22190-
execArgs.push('-gcovArgs', `${gcovArgs}`);
22190+
execArgs.push('--ga', `${gcovArgs}`);
2219122191
}
2219222192
if (gcovIgnore) {
22193-
execArgs.push('-gcovIgnore', `${gcovIgnore}`);
22193+
execArgs.push('--gi', `${gcovIgnore}`);
2219422194
}
2219522195
if (gcovInclude) {
22196-
execArgs.push('-gcovInclude', `${gcovInclude}`);
22196+
execArgs.push('--gI', `${gcovInclude}`);
2219722197
}
2219822198
if (gcovExecutable) {
22199-
execArgs.push('-gcovExecutable', `${gcovExecutable}`);
22199+
execArgs.push('--gx', `${gcovExecutable}`);
2220022200
}
2220122201
if (networkFilter) {
22202-
execArgs.push('-networkFilter', `${networkFilter}`);
22202+
execArgs.push('-i', `${networkFilter}`);
2220322203
}
2220422204
if (networkPrefix) {
22205-
execArgs.push('-networkPrefix', `${networkPrefix}`);
22205+
execArgs.push('-k', `${networkPrefix}`);
2220622206
}
2220722207
if (overrideBranch) {
2220822208
execArgs.push('-B', `${overrideBranch}`);
@@ -22236,10 +22236,10 @@ const buildExec = () => {
2223622236
execArgs.push('-r', `${slug}`);
2223722237
}
2223822238
if (swift) {
22239-
execArgs.push('-xs');
22239+
execArgs.push('--xs');
2224022240
}
2224122241
if (swift && swiftProject) {
22242-
execArgs.push('-xsp', `${swiftProject}`);
22242+
execArgs.push('--xsp', `${swiftProject}`);
2224322243
}
2224422244
if (upstream) {
2224522245
execArgs.push('-U', `${upstream}`);
@@ -22251,8 +22251,8 @@ const buildExec = () => {
2225122251
execArgs.push('-v');
2225222252
}
2225322253
if (xcode && xcodeArchivePath) {
22254-
execArgs.push('-xc');
22255-
execArgs.push('-xp', `${xcodeArchivePath}`);
22254+
execArgs.push('--xc');
22255+
execArgs.push('--xp', `${xcodeArchivePath}`);
2225622256
}
2225722257
if (uploaderVersion == '') {
2225822258
uploaderVersion = 'latest';

Diff for: dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/buildExec.test.ts

+14-15
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ test('all arguments', () => {
3333
'file': 'coverage.xml',
3434
'files': 'dir1/coverage.xml,dir2/coverage.xml',
3535
'flags': 'test,test2',
36-
'functionalities':
37-
'network',
36+
'functionalities': 'network',
3837
'full_report': 'oldDir/oldReport.json',
3938
'gcov': 'true',
4039
'gcov_args': '-v',
@@ -60,7 +59,7 @@ test('all arguments', () => {
6059
'verbose': 't',
6160
'xcode': 'true',
6261
'xcode_archive_path': '/test.xcresult',
63-
'xtra_args': '-some -other -args',
62+
'xtra_args': '--some --other --args',
6463
};
6564

6665
for (const env of Object.keys(envs)) {
@@ -88,24 +87,24 @@ test('all arguments', () => {
8887
'dir1/coverage.xml',
8988
'-f',
9089
'dir2/coverage.xml',
91-
'-full',
90+
'--full',
9291
'oldDir/oldReport.json',
9392
'-F',
9493
'test',
9594
'-F',
9695
'test2',
9796
'-g',
98-
'-gcovArgs',
97+
'--ga',
9998
'-v',
100-
'-gcovIgnore',
99+
'--gi',
101100
'*.fake',
102-
'-gcovInclude',
101+
'--gI',
103102
'real_file',
104-
'-gcovExecutable',
103+
'--gx',
105104
'gcov2',
106-
'-networkFilter',
105+
'-i',
107106
'src/',
108-
'-networkPrefix',
107+
'-k',
109108
'build/',
110109
'-B',
111110
'thomasrockhu/test',
@@ -123,18 +122,18 @@ test('all arguments', () => {
123122
'coverage/',
124123
'-r',
125124
'fakeOwner/fakeRepo',
126-
'-xs',
127-
'-xsp',
125+
'--xs',
126+
'--xsp',
128127
'MyApp',
129128
'-U',
130129
'https://codecov.example.com',
131130
'-u',
132131
'https://codecov.enterprise.com',
133132
'-v',
134-
'-xc',
135-
'-xp',
133+
'--xc',
134+
'--xp',
136135
'/test.xcresult',
137-
'-some -other -args',
136+
'--some --other --args',
138137
]);
139138
expect(failCi).toBeTruthy();
140139

Diff for: src/buildExec.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const buildExec = () => {
115115
});
116116
}
117117
if (fullReport) {
118-
execArgs.push('-full', `${fullReport}`);
118+
execArgs.push('--full', `${fullReport}`);
119119
}
120120
if (flags) {
121121
flags.split(',').map((f) => f.trim()).forEach((f) => {
@@ -127,23 +127,23 @@ const buildExec = () => {
127127
execArgs.push('-g');
128128
}
129129
if (gcovArgs) {
130-
execArgs.push('-gcovArgs', `${gcovArgs}`);
130+
execArgs.push('--ga', `${gcovArgs}`);
131131
}
132132
if (gcovIgnore) {
133-
execArgs.push('-gcovIgnore', `${gcovIgnore}`);
133+
execArgs.push('--gi', `${gcovIgnore}`);
134134
}
135135
if (gcovInclude) {
136-
execArgs.push('-gcovInclude', `${gcovInclude}`);
136+
execArgs.push('--gI', `${gcovInclude}`);
137137
}
138138
if (gcovExecutable) {
139-
execArgs.push('-gcovExecutable', `${gcovExecutable}`);
139+
execArgs.push('--gx', `${gcovExecutable}`);
140140
}
141141

142142
if (networkFilter) {
143-
execArgs.push('-networkFilter', `${networkFilter}`);
143+
execArgs.push('-i', `${networkFilter}`);
144144
}
145145
if (networkPrefix) {
146-
execArgs.push('-networkPrefix', `${networkPrefix}`);
146+
execArgs.push('-k', `${networkPrefix}`);
147147
}
148148

149149
if (overrideBranch) {
@@ -180,10 +180,10 @@ const buildExec = () => {
180180
execArgs.push('-r', `${slug}`);
181181
}
182182
if (swift) {
183-
execArgs.push('-xs');
183+
execArgs.push('--xs');
184184
}
185185
if (swift && swiftProject) {
186-
execArgs.push('-xsp', `${swiftProject}`);
186+
execArgs.push('--xsp', `${swiftProject}`);
187187
}
188188
if (upstream) {
189189
execArgs.push('-U', `${upstream}`);
@@ -195,8 +195,8 @@ const buildExec = () => {
195195
execArgs.push('-v');
196196
}
197197
if (xcode && xcodeArchivePath) {
198-
execArgs.push('-xc');
199-
execArgs.push('-xp', `${xcodeArchivePath}`);
198+
execArgs.push('--xc');
199+
execArgs.push('--xp', `${xcodeArchivePath}`);
200200
}
201201

202202
if (uploaderVersion == '') {

0 commit comments

Comments
 (0)