當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。