Skip to content

Commit

Permalink
Reverted extra changes
Browse files Browse the repository at this point in the history
  • Loading branch information
EzzhevNikita committed May 17, 2021
1 parent 022324e commit 66f042e
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 34 deletions.
2 changes: 0 additions & 2 deletions Tasks/JavaToolInstallerV0/FileExtractor/JavaFilesExtractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,7 @@ export class JavaFilesExtractor {
JavaFilesExtractor.getJavaHomeFromStructure(pathToExtractedJDK) :
pathToExtractedJDK;
console.log(taskLib.loc('SetJavaHome', jdkDirectory));
console.log('------------WE_ARE_HERE_PART_2------------');
taskLib.setVariable('JAVA_HOME', jdkDirectory);
console.log('------------WE_ARE_HERE_PART_3------------');
return jdkDirectory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"loc.input.label.cleanDestinationDirectory": "Clean destination directory",
"loc.input.help.cleanDestinationDirectory": "Select this option to clean the destination directory before JDK is extracted into it.",
"loc.input.label.createExtractDirectory": "Create directory for extracting",
"loc.input.help.createExtractDirectory": "By default taks is creating directory similar to this JAVA_HOME_8_X64_OpenJDK_zip for extracting JDK. This option allow to disable ctreation of this folder, in this case JDK will be located in root of jdkDestinationDirectory",
"loc.input.help.createExtractDirectory": "By default, task is creating a directory similar to this JAVA_HOME_8_X64_OpenJDK_zip for extracting JDK. This option allows to disable creation of this folder, in this case, JDK will be located in the root of jdkDestinationDirectory",
"loc.messages.DownloadFromAzureBlobStorage": "Downloading artifacts from Azure blob storage, Container Name: %s",
"loc.messages.SuccessFullyFetchedItemList": "Successfully fetched list of items",
"loc.messages.StorageAccountDoesNotExist": "Failed to get azure storage account with name %s.",
Expand Down
24 changes: 0 additions & 24 deletions Tasks/JavaToolInstallerV0/Tests/L0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,4 @@ describe('JavaToolInstaller L0 Suite', function () {

assert(testRunner.failed, 'task should have failed');
});

// it('should fail when JavaToolInstaller is run with to destination folder specified', function () {
// this.timeout(20000);

// const testPath: string = path.join(__dirname, 'L0UnzipTest.js');
// const testRunner: ttm.MockTestRunner = new ttm.MockTestRunner(testPath);

// testRunner.run();
// console.log(testRunner.stdout);

// assert(testRunner.succeeded, 'task should have succeeded.');
// });

it('should not fail', function () {
this.timeout(20000);

const testPath: string = path.join(__dirname, 'L0CheckExtractDirectory.js');
const testRunner: ttm.MockTestRunner = new ttm.MockTestRunner(testPath);

testRunner.run();
console.log(testRunner.stdout);

assert(testRunner.succeeded, 'task should have succeeded.');
});
});
5 changes: 0 additions & 5 deletions Tasks/JavaToolInstallerV0/javatoolinstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,9 @@ async function getJava(versionSpec: string, jdkArchitectureOption: string): Prom
compressedFileExtension = JavaFilesExtractor.getSupportedFileEnding(jdkFileName);
jdkDirectory = await installJDK(jdkFileName, compressedFileExtension, extractLocation, extendedJavaHome, versionSpec, cleanDestinationDirectory);
}
console.log('------------WE_ARE_HERE_PART_4------------');
console.log(taskLib.loc('SetExtendedJavaHome', extendedJavaHome, jdkDirectory));
console.log('------------WE_ARE_HERE_PART_5------------');
taskLib.setVariable(extendedJavaHome, jdkDirectory);
console.log('------------WE_ARE_HERE_PART_6------------');
toolLib.prependPath(path.join(jdkDirectory, BIN_FOLDER));
console.log('------------WE_ARE_HERE_PART_7------------');
}

/**
Expand Down Expand Up @@ -134,7 +130,6 @@ async function installJDK(sourceFile: string, fileExtension: string, archiveExtr
else {
const createExtractDirectory: boolean = taskLib.getBoolInput('cleanDestinationDirectory', false);
let extractionDirectory: string = "";
console.log("----------------We are here----------------: " + jdkDirectory);
if (createExtractDirectory){
const extractDirectoryName: string = `${extendedJavaHome}_${JavaFilesExtractor.getStrippedName(sourceFile)}_${fileExtension.substr(1)}`;
extractionDirectory = path.join(archiveExtractLocation, extractDirectoryName);
Expand Down
4 changes: 2 additions & 2 deletions Tasks/JavaToolInstallerV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"defaultValue": "",
"required": true,
"visibleRule": "jdkSourceOption != PreInstalled",
"helpMarkDown": "On Linux and Windows, this is used as the destination directory for JDK installation. On macOS, this directory is used as a temporary folder for extracting .dmg's since macOS doesn't support installing of JDK to specific directory."
"helpMarkDown": "On Linux and Windows, this is used as the destination directory for JDK installation. On macOS, this directory is used as a temporary folder for extracting of .dmg's since macOS doesn't support installing of JDK to specific directory."
},
{
"name": "cleanDestinationDirectory",
Expand All @@ -133,7 +133,7 @@
"required": false,
"defaultValue": true,
"visibleRule": "jdkSourceOption != PreInstalled",
"helpMarkDown": "By default taks is creating directory similar to this JAVA_HOME_8_X64_OpenJDK_zip for extracting JDK. This option allow to disable ctreation of this folder, in this case JDK will be located in root of jdkDestinationDirectory"
"helpMarkDown": "By default, task is creating a directory similar to this JAVA_HOME_8_X64_OpenJDK_zip for extracting JDK. This option allows to disable creation of this folder, in this case, JDK will be located in the root of jdkDestinationDirectory"
}
],
"dataSourceBindings": [
Expand Down

0 comments on commit 66f042e

Please sign in to comment.