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


TypeScript task.resolve函数代码示例

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


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

示例1: getProvisioningProfilePath

function getProvisioningProfilePath(uuid: string, provProfilePath?: string): string {
    let profileExtension: string = '';
    if (provProfilePath) {
        profileExtension = path.extname(provProfilePath);
    }
    return tl.resolve(getUserProvisioningProfilesPath(), uuid.trim().concat(profileExtension));
}
开发者ID:Microsoft,项目名称:vsts-tasks,代码行数:7,代码来源:ios-signing-common.ts

示例2:

var jarsigning = (fn: string) => {
    // file must exist
    tl.checkPath(fn, 'file to sign');

    var jarsigner = tl.which("jarsigner", false);
    if (!jarsigner) {
        var java_home = tl.getVariable('JAVA_HOME');
        if (!java_home) {
            throw tl.loc('JavaHomeNotSet');
        }

        jarsigner = tl.resolve(java_home, 'bin', 'jarsigner');
    }

    var jarsignerRunner = tl.tool(jarsigner);

    // Get keystore file path for signing
    var keystoreFile = tl.getTaskVariable('KEYSTORE_FILE_PATH');

    // Get keystore alias
    var keystoreAlias = tl.getInput('keystoreAlias', true);

    var keystorePass = tl.getInput('keystorePass', false);

    var keyPass = tl.getInput('keyPass', false);

    var jarsignerArguments = tl.getInput('jarsignerArguments', false);

    jarsignerRunner.arg(['-keystore', keystoreFile]);

    if (keystorePass) {
        jarsignerRunner.arg(['-storepass', keystorePass]);
    }

    if (keyPass) {
        jarsignerRunner.arg(['-keypass', keyPass]);
    }

    if (jarsignerArguments) {
        jarsignerRunner.line(jarsignerArguments);
    }

    var unsignedFn = fn + ".unsigned";
    var success = tl.mv(fn, unsignedFn, '-f', false);

    jarsignerRunner.arg(['-signedjar', fn, unsignedFn, keystoreAlias]);

    return jarsignerRunner.exec(null);
}
开发者ID:Microsoft,项目名称:vsts-tasks,代码行数:49,代码来源:androidsigning.ts

示例3: Error

const findAndroidTool = (tool: string): string => {
    const androidHome = tl.getVariable('ANDROID_HOME');
    if (!androidHome) {
        throw new Error(tl.loc('AndroidHomeNotSet'));
    }

    // add * in search as on Windows the tool may end with ".exe" or ".bat"
    const toolsList = tl.findMatch(tl.resolve(androidHome, 'build-tools'), tool + '*', null, { matchBase: true });

    if (!toolsList || toolsList.length === 0) {
        throw new Error(tl.loc('CouldNotFindToolInAndroidHome', tool, androidHome));
    }

    return toolsList[0];
};
开发者ID:Microsoft,项目名称:vsts-tasks,代码行数:15,代码来源:androidsigning.ts

示例4: getSecureFileTempDownloadPath

 /**
  * Returns the temporary download location for the secure file
  * @param secureFileId
  */
 getSecureFileTempDownloadPath(secureFileId: string): string {
     const fileName: string = tl.getSecureFileName(secureFileId);
     return tl.resolve(tl.getVariable('Agent.TempDirectory'), fileName);
 }
开发者ID:Microsoft,项目名称:vsts-tasks,代码行数:8,代码来源:securefiles-common.ts

示例5: getUserProvisioningProfilesPath

function getUserProvisioningProfilesPath(): string {
    return tl.resolve(tl.getVariable('HOME'), 'Library', 'MobileDevice', 'Provisioning Profiles');
}
开发者ID:Microsoft,项目名称:vsts-tasks,代码行数:3,代码来源:ios-signing-common.ts

示例6: getTempKeychainPath

export function getTempKeychainPath(): string {
    let keychainName: string = 'ios_signing_temp.keychain';
    let getTempKeychainPath: string = tl.resolve(tl.getVariable('Agent.TempDirectory'), keychainName);
    return getTempKeychainPath;
}
开发者ID:Microsoft,项目名称:vsts-tasks,代码行数:5,代码来源:ios-signing-common.ts

示例7: resolveToolPath

export function resolveToolPath(path: string ): string {
    return tl.resolve(path);
}
开发者ID:Microsoft,项目名称:vsts-tasks,代码行数:3,代码来源:Utility.ts


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