mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-25 04:11:45 +00:00
feat: add useCwd option
This commit adds the useCwd uploader option to the action. Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
This commit is contained in:
parent
bbeaa14035
commit
90a6d0bb23
5 changed files with 23991 additions and 935 deletions
|
|
@ -56,6 +56,9 @@ inputs:
|
|||
slug:
|
||||
description: 'Specify the slug manually (Enterprise use)'
|
||||
required: false
|
||||
useCwd:
|
||||
description: 'Use the current working directory instead of the git root'
|
||||
required: false
|
||||
verbose:
|
||||
description: 'Specify whether the Codecov output should be verbose'
|
||||
required: false
|
||||
|
|
|
|||
24741
dist/index.js
vendored
24741
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -69,6 +69,7 @@ test('upload args', () => {
|
|||
'working-directory': 'src',
|
||||
'plugin': 'xcode',
|
||||
'exclude': 'src',
|
||||
'useCwd': 'true',
|
||||
};
|
||||
for (const env of Object.keys(envs)) {
|
||||
process.env['INPUT_' + env.toUpperCase()] = envs[env];
|
||||
|
|
@ -114,6 +115,7 @@ test('upload args', () => {
|
|||
'xcode',
|
||||
'--exclude',
|
||||
'src',
|
||||
'--useCwd',
|
||||
];
|
||||
|
||||
expect(uploadExecArgs).toEqual(expectedArgs);
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ const buildUploadExec = () => {
|
|||
const workingDir = core.getInput('working-directory');
|
||||
const plugin = core.getInput('plugin');
|
||||
const exclude = core.getInput('exclude');
|
||||
const useCwd = isTrue(core.getInput('useCwd'));
|
||||
|
||||
const uploadExecArgs = [];
|
||||
const uploadCommand = 'do-upload';
|
||||
|
|
@ -244,6 +245,9 @@ const buildUploadExec = () => {
|
|||
if (exclude) {
|
||||
uploadExecArgs.push('--exclude', `${exclude}`);
|
||||
}
|
||||
if (useCwd) {
|
||||
uploadExecArgs.push('--useCwd');
|
||||
}
|
||||
|
||||
if (uploaderVersion == '') {
|
||||
uploaderVersion = 'latest';
|
||||
|
|
|
|||
Loading…
Reference in a new issue