本文整理汇总了TypeScript中azure-pipelines-task-lib/toolrunner.ToolRunner.argIf方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ToolRunner.argIf方法的具体用法?TypeScript ToolRunner.argIf怎么用?TypeScript ToolRunner.argIf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类azure-pipelines-task-lib/toolrunner.ToolRunner
的用法示例。
在下文中一共展示了ToolRunner.argIf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: run
//.........这里部分代码省略.........
let args: string = tl.getInput('args', false);
telemetryData.actions = actions;
telemetryData.packageApp = packageApp;
//--------------------------------------------------------
// Exec Tools
//--------------------------------------------------------
// --- Xcode Version ---
let xcv: ToolRunner = tl.tool(tool);
xcv.arg('-version');
let xcodeMajorVersion: number = 0;
xcv.on('stdout', (data) => {
const match = data.toString().trim().match(/Xcode (.+)/g);
tl.debug('match = ' + match);
if (match) {
const versionString = match.toString().replace('Xcode', '').trim();
const majorVersion: number = parseInt(versionString);
tl.debug('majorVersion = ' + majorVersion);
telemetryData.xcodeVersion = versionString;
if (!isNaN(majorVersion)) {
xcodeMajorVersion = majorVersion;
}
}
});
await xcv.exec();
tl.debug('xcodeMajorVersion = ' + xcodeMajorVersion);
// --- Xcode build arguments ---
let xcb: ToolRunner = tl.tool(tool);
xcb.argIf(sdk, ['-sdk', sdk]);
xcb.argIf(configuration, ['-configuration', configuration]);
if (ws && tl.filePathSupplied('xcWorkspacePath')) {
xcb.argIf(isProject, '-project');
xcb.argIf(!isProject, '-workspace');
xcb.arg(ws);
}
xcb.argIf(scheme, ['-scheme', scheme]);
// Add a -destination argument for each device and simulator.
if (destinations) {
destinations.forEach(destination => {
xcb.arg(['-destination', destination]);
});
}
xcb.arg(actions);
if (args) {
xcb.line(args);
}
//--------------------------------------------------------
// iOS signing and provisioning
//--------------------------------------------------------
let signingOption: string = tl.getInput('signingOption', true);
let xcode_codeSigningAllowed: string;
let xcode_codeSignStyle: string;
let xcode_otherCodeSignFlags: string;
let xcode_codeSignIdentity: string;
let xcode_provProfile: string;
let xcode_provProfileSpecifier: string;
let xcode_devTeam: string;
telemetryData.signingOption = signingOption;