From ec82e18e63b4a230356c641ee5dcb6477f0ed3c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D0=B0=D0=B4=D0=B8=D0=BD=20=D0=94?= =?UTF-8?q?=D0=B0=D0=BC=D1=8F=D0=BD=D0=BE=D0=B2?= Date: Thu, 4 Jun 2020 20:09:50 +0300 Subject: [PATCH 1/2] Fix installation task on linux hosts Linux Flutter builds are distributed in Tar archives instead of Zip. --- tasks/install/index.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tasks/install/index.ts b/tasks/install/index.ts index a53c24c..e42350e 100644 --- a/tasks/install/index.ts +++ b/tasks/install/index.ts @@ -82,12 +82,17 @@ async function findSdkInformation(channel: string, arch: string, version: string async function downloadAndCacheSdk(sdkInfo: { downloadUrl: string, version: string }, channel: string, arch: string): Promise { // 1. Download SDK archive task.debug(`Starting download archive from '${sdkInfo.downloadUrl}'`); - var bundleZip = await tool.downloadTool(sdkInfo.downloadUrl); - task.debug(`Succeeded to download '${bundleZip}' archive from '${sdkInfo.downloadUrl}'`); + var bundleArchive = await tool.downloadTool(sdkInfo.downloadUrl); + task.debug(`Succeeded to download '${bundleArchive}' archive from '${sdkInfo.downloadUrl}'`); // 2. Extracting SDK bundle task.debug(`Extracting '${sdkInfo.downloadUrl}' archive`); - var bundleDir = await tool.extractZip(bundleZip); + var bundleDir; + if (sdkInfo.downloadUrl.endsWith('tar.xz')) { + bundleDir = await tool.extractTar(bundleArchive); + } else { + bundleDir = await tool.extractZip(bundleArchive); + } task.debug(`Extracted to '${bundleDir}' '${sdkInfo.downloadUrl}' archive`); // 3. Adding SDK bundle to cache @@ -142,4 +147,4 @@ async function getJSON(hostname: string, path: string): Promise { req.end() }); -} \ No newline at end of file +} From 2285713232bb18024f660b3ed55faadf7430ddf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D1=81=D1=82=D0=B0=D0=B4=D0=B8=D0=BD=20=D0=94?= =?UTF-8?q?=D0=B0=D0=BC=D1=8F=D0=BD=D0=BE=D0=B2?= Date: Thu, 18 Jun 2020 18:01:59 +0300 Subject: [PATCH 2/2] Update dependency on azure-pipelines-tool-lib This version includes a fix for the `extractTar` function --- tasks/install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/install/package.json b/tasks/install/package.json index dc4ab6a..aead442 100644 --- a/tasks/install/package.json +++ b/tasks/install/package.json @@ -17,7 +17,7 @@ }, "homepage": "https://github.com/aloisdeniel/vsts-flutter-tasks#readme", "dependencies": { - "azure-pipelines-tool-lib": "0.12.0" + "azure-pipelines-tool-lib": "0.13.2" }, "devDependencies": { "@types/node": "^13.13.5"