Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix installation task on linux hosts #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions tasks/install/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
// 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
Expand Down Expand Up @@ -142,4 +147,4 @@ async function getJSON(hostname: string, path: string): Promise<any> {

req.end()
});
}
}
2 changes: 1 addition & 1 deletion tasks/install/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down