當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript NuGetToolRunner.createNuGetToolRunner函數代碼示例

本文整理匯總了TypeScript中nuget-task-common/NuGetToolRunner.createNuGetToolRunner函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript createNuGetToolRunner函數的具體用法?TypeScript createNuGetToolRunner怎麽用?TypeScript createNuGetToolRunner使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了createNuGetToolRunner函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: publishPackageAsync

function publishPackageAsync(packageFile: string, options: PublishOptions): Q.Promise<number> {
    let nugetTool = ngToolRunner.createNuGetToolRunner(options.nuGetPath, options.environment);
    nugetTool.arg("push");

    nugetTool.arg("-NonInteractive");

    nugetTool.pathArg(packageFile);

    nugetTool.arg(["-Source", options.feedUri]);

    nugetTool.argIf(options.apiKey, ["-ApiKey", options.apiKey]);

    if (options.configFile) {
        nugetTool.arg("-ConfigFile");
        nugetTool.pathArg(options.configFile);
    }

    if (options.verbosity && options.verbosity !== "-") {
        nugetTool.arg("-Verbosity");
        nugetTool.arg(options.verbosity);
    }

    if (options.extraArgs) {
        nugetTool.argString(options.extraArgs);
    }

    return nugetTool.exec();
}
開發者ID:HSAR,項目名稱:vso-agent-tasks,代碼行數:28,代碼來源:nugetpublisher.ts

示例2: restorePackages

function restorePackages(solutionFile: string, options: RestoreOptions): Q.Promise<number> {
    var nugetTool = ngToolRunner.createNuGetToolRunner(options.nuGetPath, options.environment);
    nugetTool.arg(options.restoreMode)
    nugetTool.arg('-NonInteractive');

    nugetTool.pathArg(solutionFile);

    if (options.configFile) {
        nugetTool.arg('-ConfigFile');
        nugetTool.pathArg(options.configFile);
    }

    if (options.noCache) {
        nugetTool.arg('-NoCache');
    }

    if (options.verbosity && options.verbosity != "-") {
        nugetTool.arg("-Verbosity");
        nugetTool.arg(options.verbosity);
    }

    if (options.extraArgs) {
        nugetTool.argString(options.extraArgs);
    }

    return nugetTool.exec({cwd: path.dirname(solutionFile)});
}
開發者ID:jascam,項目名稱:vsts-tasks,代碼行數:27,代碼來源:nugetinstaller.ts

示例3: publishPackage

function publishPackage(packageFile: string, options: PublishOptions): Q.Promise<number> {
    var nugetTool = ngToolRunner.createNuGetToolRunner(options.nuGetPath, options.environment);
    nugetTool.arg('push')

    nugetTool.arg('-NonInteractive');

    nugetTool.pathArg(packageFile);

    nugetTool.arg(["-Source", options.feedUri]);

    nugetTool.argIf(options.apiKey, ['-ApiKey', options.apiKey]);

    if (options.configFile) {
        nugetTool.arg('-ConfigFile');
        nugetTool.pathArg(options.configFile);
    }

    if (options.verbosity) {
        nugetTool.arg("-Verbosity");
        nugetTool.arg(options.verbosity);
    }

    if (options.extraArgs) {
        nugetTool.argString(options.extraArgs);
    }

    return nugetTool.exec();
}
開發者ID:chsword,項目名稱:vsts-tasks,代碼行數:28,代碼來源:nugetpublisher.ts

示例4: runNuGetAsync

function runNuGetAsync(executionOptions: NuGetExecutionOptions): Q.Promise<number> {
    let nugetTool = ngToolRunner.createNuGetToolRunner(executionOptions.nuGetPath, executionOptions.environment);
    nugetTool.arg(executionOptions.command);
    nugetTool.arg("-NonInteractive");

    if (executionOptions.args) {
        nugetTool.line(executionOptions.args);
    }

    return nugetTool.exec();
}
開發者ID:shubham90,項目名稱:vsts-tasks,代碼行數:11,代碼來源:nuget.ts


注:本文中的nuget-task-common/NuGetToolRunner.createNuGetToolRunner函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。