mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-08 16:16:24 +00:00
build commit,report and upload args based on codecovcli (#943)
* build commit,report and upload args based on codecovcli * add tests * Empty-Commit
This commit is contained in:
306
dist/index.js
vendored
306
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
@@ -1,9 +1,14 @@
|
|||||||
import * as github from '@actions/github';
|
import * as github from '@actions/github';
|
||||||
|
|
||||||
import buildExec from './buildExec';
|
import {
|
||||||
|
buildCommitExec,
|
||||||
|
buildExec,
|
||||||
|
buildGeneralExec,
|
||||||
|
buildReportExec,
|
||||||
|
buildUploadExec,
|
||||||
|
} from './buildExec';
|
||||||
|
|
||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
import {version} from '../package.json';
|
||||||
const {version} = require('../package.json');
|
|
||||||
|
|
||||||
const context = github.context;
|
const context = github.context;
|
||||||
|
|
||||||
@@ -19,6 +24,7 @@ test('no arguments', () => {
|
|||||||
if (context.eventName == 'pull_request') {
|
if (context.eventName == 'pull_request') {
|
||||||
args.push('-C', `${context.payload.pull_request.head.sha}`);
|
args.push('-C', `${context.payload.pull_request.head.sha}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(execArgs).toEqual(args);
|
expect(execArgs).toEqual(args);
|
||||||
expect(failCi).toBeFalsy();
|
expect(failCi).toBeFalsy();
|
||||||
});
|
});
|
||||||
@@ -151,7 +157,7 @@ describe('trim arguments after splitting them', () => {
|
|||||||
];
|
];
|
||||||
|
|
||||||
test('files', () => {
|
test('files', () => {
|
||||||
const envs = {'files': './client-coverage.txt, ./lcov.info'};
|
const envs = {files: './client-coverage.txt, ./lcov.info'};
|
||||||
|
|
||||||
for (const [name, value] of Object.entries(envs)) {
|
for (const [name, value] of Object.entries(envs)) {
|
||||||
process.env['INPUT_' + name.toUpperCase()] = value;
|
process.env['INPUT_' + name.toUpperCase()] = value;
|
||||||
@@ -175,7 +181,7 @@ describe('trim arguments after splitting them', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('flags', () => {
|
test('flags', () => {
|
||||||
const envs = {'flags': 'ios, mobile'};
|
const envs = {flags: 'ios, mobile'};
|
||||||
|
|
||||||
for (const [name, value] of Object.entries(envs)) {
|
for (const [name, value] of Object.entries(envs)) {
|
||||||
process.env['INPUT_' + name.toUpperCase()] = value;
|
process.env['INPUT_' + name.toUpperCase()] = value;
|
||||||
@@ -199,7 +205,7 @@ describe('trim arguments after splitting them', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('functionalities', () => {
|
test('functionalities', () => {
|
||||||
const envs = {'functionalities': 'network, gcov'};
|
const envs = {functionalities: 'network, gcov'};
|
||||||
|
|
||||||
for (const [name, value] of Object.entries(envs)) {
|
for (const [name, value] of Object.entries(envs)) {
|
||||||
process.env['INPUT_' + name.toUpperCase()] = value;
|
process.env['INPUT_' + name.toUpperCase()] = value;
|
||||||
@@ -222,3 +228,212 @@ describe('trim arguments after splitting them', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('general args', () => {
|
||||||
|
const envs = {
|
||||||
|
url: 'https://codecov.enterprise.com',
|
||||||
|
verbose: 't',
|
||||||
|
};
|
||||||
|
for (const env of Object.keys(envs)) {
|
||||||
|
process.env['INPUT_' + env.toUpperCase()] = envs[env];
|
||||||
|
}
|
||||||
|
|
||||||
|
const args = buildGeneralExec();
|
||||||
|
|
||||||
|
expect(args).toEqual(
|
||||||
|
expect.arrayContaining([
|
||||||
|
'--enterprise-url',
|
||||||
|
'https://codecov.enterprise.com',
|
||||||
|
'-v',
|
||||||
|
]));
|
||||||
|
|
||||||
|
for (const env of Object.keys(envs)) {
|
||||||
|
delete process.env['INPUT_' + env.toUpperCase()];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
test('upload args using context', () => {
|
||||||
|
const expectedArgs = [
|
||||||
|
'-n',
|
||||||
|
'',
|
||||||
|
];
|
||||||
|
const {uploadExecArgs, uploadCommand} = buildUploadExec();
|
||||||
|
if (context.eventName == 'pull_request') {
|
||||||
|
expectedArgs.push('-C', `${context.payload.pull_request.head.sha}`);
|
||||||
|
}
|
||||||
|
if (context.eventName == 'pull_request_target') {
|
||||||
|
expectedArgs.push('-P', `${context.payload.number}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
expect(uploadExecArgs).toEqual(expectedArgs);
|
||||||
|
expect(uploadCommand).toEqual('do-upload');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('upload args', () => {
|
||||||
|
const envs = {
|
||||||
|
'directory': 'coverage/',
|
||||||
|
'dry_run': 'true',
|
||||||
|
'env_vars': 'OS,PYTHON',
|
||||||
|
'fail_ci_if_error': 'true',
|
||||||
|
'file': 'coverage.xml',
|
||||||
|
'files': 'dir1/coverage.xml,dir2/coverage.xml',
|
||||||
|
'flags': 'test,test2',
|
||||||
|
'name': 'codecov',
|
||||||
|
'override_branch': 'thomasrockhu/test',
|
||||||
|
'override_build': '1',
|
||||||
|
'override_commit': '9caabca5474b49de74ef5667deabaf74cdacc244',
|
||||||
|
'override_pr': '2',
|
||||||
|
'root_dir': 'root/',
|
||||||
|
'slug': 'fakeOwner/fakeRepo',
|
||||||
|
'token': 'd3859757-ab80-4664-924d-aef22fa7557b',
|
||||||
|
'working-directory': 'src',
|
||||||
|
'plugin': 'xcode',
|
||||||
|
'exclude': 'src',
|
||||||
|
};
|
||||||
|
for (const env of Object.keys(envs)) {
|
||||||
|
process.env['INPUT_' + env.toUpperCase()] = envs[env];
|
||||||
|
}
|
||||||
|
|
||||||
|
const {uploadExecArgs, uploadCommand} = buildUploadExec();
|
||||||
|
const expectedArgs = [
|
||||||
|
'-n',
|
||||||
|
'codecov',
|
||||||
|
'-d',
|
||||||
|
'-e',
|
||||||
|
'OS,PYTHON',
|
||||||
|
'-Z',
|
||||||
|
'-f',
|
||||||
|
'coverage.xml',
|
||||||
|
'-f',
|
||||||
|
'dir1/coverage.xml',
|
||||||
|
'-f',
|
||||||
|
'dir2/coverage.xml',
|
||||||
|
'-F',
|
||||||
|
'test',
|
||||||
|
'-F',
|
||||||
|
'test2',
|
||||||
|
'-B',
|
||||||
|
'thomasrockhu/test',
|
||||||
|
'-b',
|
||||||
|
'1',
|
||||||
|
'-C',
|
||||||
|
'9caabca5474b49de74ef5667deabaf74cdacc244',
|
||||||
|
'-P',
|
||||||
|
'2',
|
||||||
|
'--network-root-folder',
|
||||||
|
'root/',
|
||||||
|
'-s',
|
||||||
|
'coverage/',
|
||||||
|
'-r',
|
||||||
|
'fakeOwner/fakeRepo',
|
||||||
|
'--plugin',
|
||||||
|
'xcode',
|
||||||
|
'--exclude',
|
||||||
|
'src',
|
||||||
|
];
|
||||||
|
|
||||||
|
expect(uploadExecArgs).toEqual(expectedArgs);
|
||||||
|
expect(uploadCommand).toEqual('do-upload');
|
||||||
|
for (const env of Object.keys(envs)) {
|
||||||
|
delete process.env['INPUT_' + env.toUpperCase()];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
test('report args', () => {
|
||||||
|
const envs = {
|
||||||
|
override_commit: '9caabca5474b49de74ef5667deabaf74cdacc244',
|
||||||
|
slug: 'fakeOwner/fakeRepo',
|
||||||
|
token: 'd3859757-ab80-4664-924d-aef22fa7557b',
|
||||||
|
};
|
||||||
|
for (const env of Object.keys(envs)) {
|
||||||
|
process.env['INPUT_' + env.toUpperCase()] = envs[env];
|
||||||
|
}
|
||||||
|
|
||||||
|
const {reportExecArgs, reportCommand} = buildReportExec();
|
||||||
|
|
||||||
|
expect(reportExecArgs).toEqual(
|
||||||
|
expect.arrayContaining([
|
||||||
|
'-C',
|
||||||
|
'9caabca5474b49de74ef5667deabaf74cdacc244',
|
||||||
|
'--slug',
|
||||||
|
'fakeOwner/fakeRepo',
|
||||||
|
]));
|
||||||
|
expect(reportCommand).toEqual('create-report');
|
||||||
|
for (const env of Object.keys(envs)) {
|
||||||
|
delete process.env['INPUT_' + env.toUpperCase()];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
test('report args using context', () => {
|
||||||
|
const envs = {
|
||||||
|
token: 'd3859757-ab80-4664-924d-aef22fa7557b',
|
||||||
|
};
|
||||||
|
for (const env of Object.keys(envs)) {
|
||||||
|
process.env['INPUT_' + env.toUpperCase()] = envs[env];
|
||||||
|
}
|
||||||
|
const expectedArgs : string[] = [];
|
||||||
|
if (context.eventName == 'pull_request') {
|
||||||
|
expectedArgs.push('-C', `${context.payload.pull_request.head.sha}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const {reportExecArgs, reportCommand} = buildReportExec();
|
||||||
|
|
||||||
|
expect(reportExecArgs).toEqual(expectedArgs);
|
||||||
|
expect(reportCommand).toEqual('create-report');
|
||||||
|
for (const env of Object.keys(envs)) {
|
||||||
|
delete process.env['INPUT_' + env.toUpperCase()];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
test('commit args', () => {
|
||||||
|
const envs = {
|
||||||
|
override_commit: '9caabca5474b49de74ef5667deabaf74cdacc244',
|
||||||
|
slug: 'fakeOwner/fakeRepo',
|
||||||
|
token: 'd3859757-ab80-4664-924d-aef22fa7557b',
|
||||||
|
override_branch: 'thomasrockhu/test',
|
||||||
|
override_pr: '2',
|
||||||
|
commit_parent: '83231650328f11695dfb754ca0f540516f188d27',
|
||||||
|
};
|
||||||
|
for (const env of Object.keys(envs)) {
|
||||||
|
process.env['INPUT_' + env.toUpperCase()] = envs[env];
|
||||||
|
}
|
||||||
|
|
||||||
|
const {commitExecArgs, commitCommand} = buildCommitExec();
|
||||||
|
|
||||||
|
expect(commitExecArgs).toEqual(
|
||||||
|
expect.arrayContaining([
|
||||||
|
'-C',
|
||||||
|
'9caabca5474b49de74ef5667deabaf74cdacc244',
|
||||||
|
'--slug',
|
||||||
|
'fakeOwner/fakeRepo',
|
||||||
|
'-B',
|
||||||
|
'thomasrockhu/test',
|
||||||
|
'--pr',
|
||||||
|
'2',
|
||||||
|
'--parent-sha',
|
||||||
|
'83231650328f11695dfb754ca0f540516f188d27',
|
||||||
|
]));
|
||||||
|
expect(commitCommand).toEqual('create-commit');
|
||||||
|
for (const env of Object.keys(envs)) {
|
||||||
|
delete process.env['INPUT_' + env.toUpperCase()];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
test('commit args using context', () => {
|
||||||
|
const expectedArgs :string[] = [];
|
||||||
|
|
||||||
|
const {commitExecArgs, commitCommand} = buildCommitExec();
|
||||||
|
if (context.eventName == 'pull_request') {
|
||||||
|
expectedArgs.push('-C', `${context.payload.pull_request.head.sha}`);
|
||||||
|
}
|
||||||
|
if (context.eventName == 'pull_request_target') {
|
||||||
|
expectedArgs.push('-P', `${context.payload.number}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
expect(commitExecArgs).toEqual(expectedArgs);
|
||||||
|
expect(commitCommand).toEqual('create-commit');
|
||||||
|
});
|
||||||
|
|||||||
243
src/buildExec.ts
243
src/buildExec.ts
@@ -218,4 +218,245 @@ const buildExec = () => {
|
|||||||
return {execArgs, options, failCi, os, uploaderVersion, verbose};
|
return {execArgs, options, failCi, os, uploaderVersion, verbose};
|
||||||
};
|
};
|
||||||
|
|
||||||
export default buildExec;
|
const buildCommitExec = () => {
|
||||||
|
const commitParent = core.getInput('commit_parent');
|
||||||
|
const overrideBranch = core.getInput('override_branch');
|
||||||
|
const overrideCommit = core.getInput('override_commit');
|
||||||
|
const overridePr = core.getInput('override_pr');
|
||||||
|
const slug = core.getInput('slug');
|
||||||
|
const token = core.getInput('token');
|
||||||
|
|
||||||
|
|
||||||
|
const commitCommand = 'create-commit';
|
||||||
|
const commitExecArgs = [];
|
||||||
|
|
||||||
|
const commitOptions:any = {};
|
||||||
|
commitOptions.env = Object.assign(process.env, {
|
||||||
|
GITHUB_ACTION: process.env.GITHUB_ACTION,
|
||||||
|
GITHUB_RUN_ID: process.env.GITHUB_RUN_ID,
|
||||||
|
GITHUB_REF: process.env.GITHUB_REF,
|
||||||
|
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY,
|
||||||
|
GITHUB_SHA: process.env.GITHUB_SHA,
|
||||||
|
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '',
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if (token) {
|
||||||
|
commitOptions.env.CODECOV_TOKEN = token;
|
||||||
|
}
|
||||||
|
if (commitParent) {
|
||||||
|
commitExecArgs.push('--parent-sha', `${commitParent}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (overrideBranch) {
|
||||||
|
commitExecArgs.push('-B', `${overrideBranch}`);
|
||||||
|
}
|
||||||
|
if (overrideCommit) {
|
||||||
|
commitExecArgs.push('-C', `${overrideCommit}`);
|
||||||
|
} else if (
|
||||||
|
`${context.eventName}` == 'pull_request' ||
|
||||||
|
`${context.eventName}` == 'pull_request_target'
|
||||||
|
) {
|
||||||
|
commitExecArgs.push('-C', `${context.payload.pull_request.head.sha}`);
|
||||||
|
}
|
||||||
|
if (overridePr) {
|
||||||
|
commitExecArgs.push('--pr', `${overridePr}`);
|
||||||
|
} else if (
|
||||||
|
`${context.eventName}` == 'pull_request_target'
|
||||||
|
) {
|
||||||
|
commitExecArgs.push('--pr', `${context.payload.number}`);
|
||||||
|
}
|
||||||
|
if (slug) {
|
||||||
|
commitExecArgs.push('--slug', `${slug}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return {commitExecArgs, commitOptions, commitCommand};
|
||||||
|
};
|
||||||
|
|
||||||
|
const buildGeneralExec = () => {
|
||||||
|
const url = core.getInput('url');
|
||||||
|
const verbose = isTrue(core.getInput('verbose'));
|
||||||
|
const args = [];
|
||||||
|
|
||||||
|
if (url) {
|
||||||
|
args.push('--enterprise-url', `${url}`);
|
||||||
|
}
|
||||||
|
if (verbose) {
|
||||||
|
args.push('-v');
|
||||||
|
}
|
||||||
|
return args;
|
||||||
|
};
|
||||||
|
|
||||||
|
const buildReportExec = () => {
|
||||||
|
const overrideCommit = core.getInput('override_commit');
|
||||||
|
const slug = core.getInput('slug');
|
||||||
|
const token = core.getInput('token');
|
||||||
|
|
||||||
|
|
||||||
|
const reportCommand = 'create-report';
|
||||||
|
const reportExecArgs = [];
|
||||||
|
|
||||||
|
const reportOptions:any = {};
|
||||||
|
reportOptions.env = Object.assign(process.env, {
|
||||||
|
GITHUB_ACTION: process.env.GITHUB_ACTION,
|
||||||
|
GITHUB_RUN_ID: process.env.GITHUB_RUN_ID,
|
||||||
|
GITHUB_REF: process.env.GITHUB_REF,
|
||||||
|
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY,
|
||||||
|
GITHUB_SHA: process.env.GITHUB_SHA,
|
||||||
|
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '',
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if (token) {
|
||||||
|
reportOptions.env.CODECOV_TOKEN = token;
|
||||||
|
}
|
||||||
|
if (overrideCommit) {
|
||||||
|
reportExecArgs.push('-C', `${overrideCommit}`);
|
||||||
|
} else if (
|
||||||
|
`${context.eventName}` == 'pull_request' ||
|
||||||
|
`${context.eventName}` == 'pull_request_target'
|
||||||
|
) {
|
||||||
|
reportExecArgs.push('-C', `${context.payload.pull_request.head.sha}`);
|
||||||
|
}
|
||||||
|
if (slug) {
|
||||||
|
reportExecArgs.push('--slug', `${slug}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {reportExecArgs, reportOptions, reportCommand};
|
||||||
|
};
|
||||||
|
|
||||||
|
const buildUploadExec = () => {
|
||||||
|
const envVars = core.getInput('env_vars');
|
||||||
|
const dryRun = isTrue(core.getInput('dry_run'));
|
||||||
|
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 name = core.getInput('name');
|
||||||
|
const os = core.getInput('os');
|
||||||
|
const overrideBranch = core.getInput('override_branch');
|
||||||
|
const overrideBuild = core.getInput('override_build');
|
||||||
|
const overrideCommit = core.getInput('override_commit');
|
||||||
|
const overridePr = core.getInput('override_pr');
|
||||||
|
const rootDir = core.getInput('root_dir');
|
||||||
|
const searchDir = core.getInput('directory');
|
||||||
|
const slug = core.getInput('slug');
|
||||||
|
const token = core.getInput('token');
|
||||||
|
let uploaderVersion = core.getInput('version');
|
||||||
|
const workingDir = core.getInput('working-directory');
|
||||||
|
const plugin = core.getInput('plugin');
|
||||||
|
const exclude = core.getInput('exclude');
|
||||||
|
|
||||||
|
const uploadExecArgs = [];
|
||||||
|
uploadExecArgs.push(
|
||||||
|
'-n',
|
||||||
|
`${name}`,
|
||||||
|
);
|
||||||
|
const uploadCommand = 'do-upload';
|
||||||
|
const uploadOptions:any = {};
|
||||||
|
uploadOptions.env = Object.assign(process.env, {
|
||||||
|
GITHUB_ACTION: process.env.GITHUB_ACTION,
|
||||||
|
GITHUB_RUN_ID: process.env.GITHUB_RUN_ID,
|
||||||
|
GITHUB_REF: process.env.GITHUB_REF,
|
||||||
|
GITHUB_REPOSITORY: process.env.GITHUB_REPOSITORY,
|
||||||
|
GITHUB_SHA: process.env.GITHUB_SHA,
|
||||||
|
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '',
|
||||||
|
});
|
||||||
|
|
||||||
|
const envVarsArg = [];
|
||||||
|
for (const envVar of envVars.split(',')) {
|
||||||
|
const envVarClean = envVar.trim();
|
||||||
|
if (envVarClean) {
|
||||||
|
uploadOptions.env[envVarClean] = process.env[envVarClean];
|
||||||
|
envVarsArg.push(envVarClean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (token) {
|
||||||
|
uploadOptions.env.CODECOV_TOKEN = token;
|
||||||
|
}
|
||||||
|
if (dryRun) {
|
||||||
|
uploadExecArgs.push('-d');
|
||||||
|
}
|
||||||
|
if (envVarsArg.length) {
|
||||||
|
uploadExecArgs.push('-e', envVarsArg.join(','));
|
||||||
|
}
|
||||||
|
if (failCi) {
|
||||||
|
uploadExecArgs.push('-Z');
|
||||||
|
}
|
||||||
|
if (file) {
|
||||||
|
uploadExecArgs.push('-f', `${file}`);
|
||||||
|
}
|
||||||
|
if (files) {
|
||||||
|
files.split(',').map((f) => f.trim()).forEach((f) => {
|
||||||
|
uploadExecArgs.push('-f', `${f}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (flags) {
|
||||||
|
flags.split(',').map((f) => f.trim()).forEach((f) => {
|
||||||
|
uploadExecArgs.push('-F', `${f}`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (overrideBranch) {
|
||||||
|
uploadExecArgs.push('-B', `${overrideBranch}`);
|
||||||
|
}
|
||||||
|
if (overrideBuild) {
|
||||||
|
uploadExecArgs.push('-b', `${overrideBuild}`);
|
||||||
|
}
|
||||||
|
if (overrideCommit) {
|
||||||
|
uploadExecArgs.push('-C', `${overrideCommit}`);
|
||||||
|
} else if (
|
||||||
|
`${context.eventName}` == 'pull_request' ||
|
||||||
|
`${context.eventName}` == 'pull_request_target'
|
||||||
|
) {
|
||||||
|
uploadExecArgs.push('-C', `${context.payload.pull_request.head.sha}`);
|
||||||
|
}
|
||||||
|
if (overridePr) {
|
||||||
|
uploadExecArgs.push('-P', `${overridePr}`);
|
||||||
|
} else if (
|
||||||
|
`${context.eventName}` == 'pull_request_target'
|
||||||
|
) {
|
||||||
|
uploadExecArgs.push('-P', `${context.payload.number}`);
|
||||||
|
}
|
||||||
|
if (rootDir) {
|
||||||
|
uploadExecArgs.push('--network-root-folder', `${rootDir}`);
|
||||||
|
}
|
||||||
|
if (searchDir) {
|
||||||
|
uploadExecArgs.push('-s', `${searchDir}`);
|
||||||
|
}
|
||||||
|
if (slug) {
|
||||||
|
uploadExecArgs.push('-r', `${slug}`);
|
||||||
|
}
|
||||||
|
if (workingDir) {
|
||||||
|
uploadOptions.cwd = workingDir;
|
||||||
|
}
|
||||||
|
if (plugin) {
|
||||||
|
uploadExecArgs.push('--plugin', `${plugin}`);
|
||||||
|
}
|
||||||
|
if (exclude) {
|
||||||
|
uploadExecArgs.push('--exclude', `${exclude}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (uploaderVersion == '') {
|
||||||
|
uploaderVersion = 'latest';
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
uploadExecArgs,
|
||||||
|
uploadOptions,
|
||||||
|
failCi,
|
||||||
|
os,
|
||||||
|
uploaderVersion,
|
||||||
|
uploadCommand,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
export {
|
||||||
|
buildExec,
|
||||||
|
buildCommitExec,
|
||||||
|
buildGeneralExec,
|
||||||
|
buildReportExec,
|
||||||
|
buildUploadExec,
|
||||||
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import * as path from 'path';
|
|||||||
|
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
|
|
||||||
import buildExec from './buildExec';
|
import {buildExec} from './buildExec';
|
||||||
import {
|
import {
|
||||||
getBaseUrl,
|
getBaseUrl,
|
||||||
getPlatform,
|
getPlatform,
|
||||||
|
|||||||
Reference in New Issue
Block a user