-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add in all the extra arguments for uploader #955
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,18 +19,22 @@ const isTrue = (variable) => { | |
const buildExec = () => { | ||
const clean = core.getInput('move_coverage_to_trash'); | ||
const commitParent = core.getInput('commit_parent'); | ||
const envVars = core.getInput('env_vars'); | ||
const dryRun = isTrue(core.getInput('dry_run')); | ||
const envVars = core.getInput('env_vars'); | ||
const failCi = isTrue(core.getInput('fail_ci_if_error')); | ||
const file = core.getInput('file'); | ||
const files = core.getInput('files'); | ||
const flags = core.getInput('flags'); | ||
const fullReport = core.getInput('full_report'); | ||
const functionalities = core.getInput('functionalities'); | ||
const gcov = core.getInput('gcov'); | ||
const gcovArgs = core.getInput('gcov_args'); | ||
const gcovExecutable = core.getInput('gcov_executable'); | ||
const gcovIgnore = core.getInput('gcov_ignore'); | ||
const gcovInclude = core.getInput('gcov_include'); | ||
const functionalities = core.getInput('functionalities'); | ||
const name = core.getInput('name'); | ||
const networkFilter = core.getInput('network_filter'); | ||
const networkPrefix = core.getInput('network_prefix'); | ||
const os = core.getInput('os'); | ||
const overrideBranch = core.getInput('override_branch'); | ||
const overrideBuild = core.getInput('override_build'); | ||
|
@@ -40,13 +44,16 @@ const buildExec = () => { | |
const rootDir = core.getInput('root_dir'); | ||
const searchDir = core.getInput('directory'); | ||
const slug = core.getInput('slug'); | ||
const swift = core.getInput('swift'); | ||
const swiftProject = core.getInput('swift_project'); | ||
const token = core.getInput('token'); | ||
let uploaderVersion = core.getInput('version'); | ||
const upstream = core.getInput('upstream_proxy'); | ||
const url = core.getInput('url'); | ||
const verbose = isTrue(core.getInput('verbose')); | ||
const workingDir = core.getInput('working-directory'); | ||
const xcode = core.getInput('xcode'); | ||
const xcodeArchivePath = core.getInput('xcode_archive_path'); | ||
const xtraArgs = core.getInput('xtra_args'); | ||
let uploaderVersion = core.getInput('version'); | ||
|
||
const execArgs = []; | ||
execArgs.push( | ||
|
@@ -106,6 +113,9 @@ const buildExec = () => { | |
execArgs.push('-f', `${f}`); | ||
}); | ||
} | ||
if (fullReport) { | ||
execArgs.push('-full', `${fullReport}`); | ||
} | ||
if (flags) { | ||
flags.split(',').map((f) => f.trim()).forEach((f) => { | ||
execArgs.push('-F', `${f}`); | ||
|
@@ -116,13 +126,23 @@ const buildExec = () => { | |
execArgs.push('-g'); | ||
} | ||
if (gcovArgs) { | ||
execArgs.push('--gcovArgs', `${gcovArgs}`); | ||
execArgs.push('-gcovArgs', `${gcovArgs}`); | ||
} | ||
if (gcovIgnore) { | ||
execArgs.push('--gcovIgnore', `${gcovIgnore}`); | ||
execArgs.push('-gcovIgnore', `${gcovIgnore}`); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is incorrect and causes files/directories listed in Only short CLI option names can be specified with a single dash ( So to fix this, one must specify FWIW, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Ah, So, this issue affects the following settings:
I just opened PR #969 for this. |
||
} | ||
if (gcovInclude) { | ||
execArgs.push('--gcovInclude', `${gcovInclude}`); | ||
execArgs.push('-gcovInclude', `${gcovInclude}`); | ||
} | ||
if (gcovExecutable) { | ||
execArgs.push('-gcovExecutable', `${gcovExecutable}`); | ||
} | ||
|
||
if (networkFilter) { | ||
execArgs.push('-networkFilter', `${networkFilter}`); | ||
} | ||
if (networkPrefix) { | ||
execArgs.push('-networkPrefix', `${networkPrefix}`); | ||
} | ||
|
||
if (overrideBranch) { | ||
|
@@ -158,18 +178,24 @@ const buildExec = () => { | |
if (slug) { | ||
execArgs.push('-r', `${slug}`); | ||
} | ||
if (swift) { | ||
execArgs.push('-xs'); | ||
} | ||
if (swift && swiftProject) { | ||
execArgs.push('-xsp', `${swiftProject}`); | ||
} | ||
if (upstream) { | ||
execArgs.push('-U', `${upstream}`); | ||
} | ||
if (url) { | ||
execArgs.push('-u', `${url}`); | ||
} | ||
if (verbose) { | ||
execArgs.push('-v'); | ||
} | ||
if (workingDir) { | ||
options.cwd = workingDir; | ||
} | ||
if (xcode && xcodeArchivePath) { | ||
execArgs.push('--xc'); | ||
execArgs.push('--xp', `${xcodeArchivePath}`); | ||
execArgs.push('-xc'); | ||
execArgs.push('-xp', `${xcodeArchivePath}`); | ||
} | ||
|
||
if (uploaderVersion == '') { | ||
|
@@ -180,6 +206,10 @@ const buildExec = () => { | |
console.debug({execArgs}); | ||
} | ||
|
||
if (xtraArgs) { | ||
execArgs.push(`${xtraArgs}`); | ||
} | ||
|
||
return {execArgs, options, failCi, os, uploaderVersion, verbose}; | ||
}; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a breaking change? Is it now required for public repos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@3flex this is not a breaking change, but we do suggest using the token when possible to prevent flakiness when hitting the GitHub API