本文整理汇总了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));
}
示例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);
}
示例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];
};
示例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);
}
示例5: getUserProvisioningProfilesPath
function getUserProvisioningProfilesPath(): string {
return tl.resolve(tl.getVariable('HOME'), 'Library', 'MobileDevice', 'Provisioning Profiles');
}
示例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;
}
示例7: resolveToolPath
export function resolveToolPath(path: string ): string {
return tl.resolve(path);
}