From 66f042e1ad1d27785054b6887055f6175e869bf3 Mon Sep 17 00:00:00 2001 From: Nikita Ezzhev Date: Mon, 17 May 2021 09:06:06 +0300 Subject: [PATCH] Reverted extra changes --- .../FileExtractor/JavaFilesExtractor.ts | 2 -- .../resources.resjson/en-US/resources.resjson | 2 +- Tasks/JavaToolInstallerV0/Tests/L0.ts | 24 ------------------- .../JavaToolInstallerV0/javatoolinstaller.ts | 5 ---- Tasks/JavaToolInstallerV0/task.json | 4 ++-- 5 files changed, 3 insertions(+), 34 deletions(-) diff --git a/Tasks/JavaToolInstallerV0/FileExtractor/JavaFilesExtractor.ts b/Tasks/JavaToolInstallerV0/FileExtractor/JavaFilesExtractor.ts index 16a192805c5a..d68841979c6a 100644 --- a/Tasks/JavaToolInstallerV0/FileExtractor/JavaFilesExtractor.ts +++ b/Tasks/JavaToolInstallerV0/FileExtractor/JavaFilesExtractor.ts @@ -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; } diff --git a/Tasks/JavaToolInstallerV0/Strings/resources.resjson/en-US/resources.resjson b/Tasks/JavaToolInstallerV0/Strings/resources.resjson/en-US/resources.resjson index a73e36bacd1c..f03a34183ed4 100644 --- a/Tasks/JavaToolInstallerV0/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/JavaToolInstallerV0/Strings/resources.resjson/en-US/resources.resjson @@ -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.", diff --git a/Tasks/JavaToolInstallerV0/Tests/L0.ts b/Tasks/JavaToolInstallerV0/Tests/L0.ts index f48d50b843a2..8d6e7be6a061 100644 --- a/Tasks/JavaToolInstallerV0/Tests/L0.ts +++ b/Tasks/JavaToolInstallerV0/Tests/L0.ts @@ -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.'); - }); }); diff --git a/Tasks/JavaToolInstallerV0/javatoolinstaller.ts b/Tasks/JavaToolInstallerV0/javatoolinstaller.ts index 629f42a906a3..4aa45e356834 100644 --- a/Tasks/JavaToolInstallerV0/javatoolinstaller.ts +++ b/Tasks/JavaToolInstallerV0/javatoolinstaller.ts @@ -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------------'); } /** @@ -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); diff --git a/Tasks/JavaToolInstallerV0/task.json b/Tasks/JavaToolInstallerV0/task.json index 06f4135d153c..b80cd998c5d3 100644 --- a/Tasks/JavaToolInstallerV0/task.json +++ b/Tasks/JavaToolInstallerV0/task.json @@ -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", @@ -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": [