当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript toolrunner.ToolRunner类代码示例

本文整理汇总了TypeScript中vsts-task-lib/toolrunner.ToolRunner的典型用法代码示例。如果您正苦于以下问题:TypeScript ToolRunner类的具体用法?TypeScript ToolRunner怎么用?TypeScript ToolRunner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ToolRunner类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: deleteProvisioningProfile

export async function deleteProvisioningProfile(uuid: string) {
    var provProfilePath : string = getProvisioningProfilePath(uuid);
    tl.warning('Deleting provisioning profile: ' + provProfilePath);
    if(fs.existsSync(provProfilePath)) {
        tl.warning('Deleting provisioning profile: ' + provProfilePath);

        var deleteProfileCommand : ToolRunner = tl.tool(tl.which('rm', true));
        deleteProfileCommand.arg(['-f', provProfilePath]);
        await deleteProfileCommand.exec();
    }
}
开发者ID:HSAR,项目名称:vso-agent-tasks,代码行数:11,代码来源:ios-signing-common.ts

示例2: getDefaultKeychainPath

export async function getDefaultKeychainPath() {
    let defaultKeychainPath: string;
    let getKeychainCmd: ToolRunner = tl.tool(tl.which('security', true));
    getKeychainCmd.arg('default-keychain');
    getKeychainCmd.on('stdout', function (data) {
        if (data) {
            defaultKeychainPath = data.toString().trim().replace(/[",\n\r\f\v]/gm, '');
        }
    })
    await getKeychainCmd.exec();
    return defaultKeychainPath;
}
开发者ID:bleissem,项目名称:vsts-tasks,代码行数:12,代码来源:ios-signing-common.ts

示例3: applySonarQubeIssuesModeInPrBuild

    /**
     * Applies parameters that will run SQ analysis in issues mode if this is a pull request build
     * @param toolRunner     ToolRunner to add parameters to
     * @returns {ToolRunner} ToolRunner with parameters added
     */
    private static applySonarQubeIssuesModeInPrBuild(toolrunner: ToolRunner): ToolRunner {
        if (VstsServerUtils.isPrBuild()) {
            console.log(tl.loc('sqAnalysis_IncrementalMode'));

            toolrunner.arg('-Dsonar.analysis.mode=issues');
            toolrunner.arg('-Dsonar.report.export.path=sonar-report.json');
        } else {
            tl.debug('Running a full SonarQube analysis');
        }

        return toolrunner;
    }
开发者ID:DarqueWarrior,项目名称:vsts-tasks,代码行数:17,代码来源:parameter-helper.ts

示例4: applySonarQubeAnalysisParams

export function applySonarQubeAnalysisParams(toolRunner: ToolRunner, sqProjectName?, sqProjectKey?, sqProjectVersion?): ToolRunner {
    if (sqProjectName) {
        toolRunner.arg('-Dsonar.projectName=' + sqProjectName);
    }
    if (sqProjectKey) {
        toolRunner.arg('-Dsonar.projectKey=' + sqProjectKey);
    }
    if (sqProjectVersion) {
        toolRunner.arg('-Dsonar.projectVersion=' + sqProjectVersion);
    }

    return toolRunner;
}
开发者ID:Jason1978-Z,项目名称:vsts-tasks,代码行数:13,代码来源:sonarqube-common.ts

示例5: applySonarQubeIssuesModeInPrBuild

export function applySonarQubeIssuesModeInPrBuild(toolrunner: ToolRunner) {

    if (isPrBuild()) {
        console.log(tl.loc('sqAnalysis_IncrementalMode'));

        toolrunner.arg("-Dsonar.analysis.mode=issues");
        toolrunner.arg("-Dsonar.report.export.path=sonar-report.json");
    }
    else
    {
        tl.debug("Running a full SonarQube analysis");
    }

    return toolrunner;
}
开发者ID:Jason1978-Z,项目名称:vsts-tasks,代码行数:15,代码来源:sonarqube-common.ts

示例6: deleteProvisioningProfile

export async function deleteProvisioningProfile(uuid: string): Promise<void> {
    if (uuid && uuid.trim()) {
        const provProfiles: string[] = tl.findMatch(getUserProvisioningProfilesPath(), uuid.trim() + '*');
        if (provProfiles) {
            for (const provProfilePath of provProfiles) {
                tl.warning('Deleting provisioning profile: ' + provProfilePath);
                if (tl.exist(provProfilePath)) {
                    const deleteProfileCommand: ToolRunner = tl.tool(tl.which('rm', true));
                    deleteProfileCommand.arg(['-f', provProfilePath]);
                    await deleteProfileCommand.exec();
                }
            }
        }
    }
}
开发者ID:grawcho,项目名称:vso-agent-tasks,代码行数:15,代码来源:ios-signing-common.ts

示例7: addLabel

function addLabel(command: ToolRunner, hostName: string, labelName: string, variableName: string)
{  
    var labelValue = tl.getVariable(variableName);
    if (labelValue) {
        command.arg(["--label", util.format("%s.image.%s=%s", hostName, labelName, labelValue)]);
    }
}
开发者ID:grawcho,项目名称:vso-agent-tasks,代码行数:7,代码来源:containerbuild.ts

示例8: executeTypings

function executeTypings(tool?: ToolRunner) {
    tl.cd(cwd);

    tool = tool || tl.createToolRunner(typings);
    tool.arg(tl.getInput("command", false));
    tool.arg(tl.getInput("arguments", false));

    return tool.exec()
        .then((code) => {
            tl.setResult(tl.TaskResult.Succeeded, tl.loc("typingsReturnCode", code));
        })
        .catch((err) => {
            tl.debug("taskRunner fail");
            tl.setResult(tl.TaskResult.Failed, tl.loc("typingsFailed", err.message));
        });
}
开发者ID:touchifyapp,项目名称:vsts-typings,代码行数:16,代码来源:typingstask.ts

示例9: applySonarQubeArgs

export function applySonarQubeArgs(mvnsq: ToolRunner, execFileJacoco?: string): ToolRunner {
    if (!sqCommon.isSonarQubeAnalysisEnabled()) {
        return mvnsq;
    }

    mvnsq = sqCommon.applySonarQubeParameters(mvnsq);

    // Apply argument for the JaCoCo tool, if enabled
    if (typeof execFileJacoco != "undefined" && execFileJacoco) {
        mvnsq.arg('-Dsonar.jacoco.reportPath=' + execFileJacoco);
    }

    mvnsq.arg("sonar:sonar");

    return mvnsq;
}
开发者ID:HSAR,项目名称:vso-agent-tasks,代码行数:16,代码来源:mavensonar.ts

示例10: execute

(async function execute() {
    try {

        var execOptions: IExecOptions = {
            cwd: undefined,
            env: undefined,
            silent: undefined,
            failOnStdErr: undefined,
            ignoreReturnCode: undefined,
            errStream: undefined,
            outStream: undefined,
            windowsVerbatimArguments: undefined
        };

        var toolRunner: ToolRunner;

        var isWin32 = os.platform() == "win32";

        if (isWin32) {
            toolRunner = tl.tool(gitVersionPath);
        } else {
            toolRunner = tl.tool("mono");
            toolRunner.arg(gitVersionPath);
        }

        toolRunner.arg([
            sourcesDirectory,
            "/output",
            "buildserver",
            "/nofetch"
        ]);

        if (updateAssemblyInfo) {
            toolRunner.arg("/updateassemblyinfo")
            if (updateAssemblyInfoFilename) {
                toolRunner.arg(updateAssemblyInfoFilename);
            } else {
                toolRunner.arg("true");
            }
        }

        if (additionalArguments) {
            toolRunner.line(additionalArguments);
        }

        var result = await toolRunner.exec(execOptions);
        if (result) {
            tl.setResult(tl.TaskResult.Failed, "An error occured during GitVersion execution")
        } else {
            tl.setResult(tl.TaskResult.Succeeded, "GitVersion executed successfully")
        }
    }
    catch (err) {
        tl.debug(err.stack)
        tl.setResult(tl.TaskResult.Failed, err);
    }
})();
开发者ID:JakeGinnivan,项目名称:GitVersion,代码行数:57,代码来源:GitVersion.ts


注:本文中的vsts-task-lib/toolrunner.ToolRunner类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。