Skip to content

Commit

Permalink
build v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed Nov 14, 2021
1 parent 2afd3aa commit 4ab5561
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions lib/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,15 @@ async function acquireMySQL(distribution, version) {
throw new Error(`Failed to download version ${version}: ${error}`);
}
//
// Extract XZ compressed tar
// Extract Zstandard compressed tar
//
const extPath = downloadUrl.endsWith(".zip")
? await tc.extractZip(downloadPath)
: downloadUrl.endsWith(".tar.xz")
? await tc.extractTar(downloadPath, "", "xJ")
: downloadUrl.endsWith(".tar.bz2")
? await tc.extractTar(downloadPath, "", "xj")
: await tc.extractTar(downloadPath);
: await tc.extractTar(downloadPath, "", ["--use-compress-program", "zstd -d --long=30", "-x"]);
return await tc.cacheDir(extPath, distribution, version);
}
function getFileName(distribution, version) {
const ext = osPlat === "win32" ? "zip" : "tar.xz";
const ext = osPlat === "win32" ? "zip" : "tar.zstd";
return `${distribution}-${version}-${osPlat}-${osArch}.${ext}`;
}
async function getDownloadUrl(filename) {
Expand All @@ -130,5 +126,5 @@ async function getDownloadUrl(filename) {
});
const info = await promise;
const actionsVersion = info.version;
return `https://setupmysql.blob.core.windows.net/actions-setup-mysql/v${actionsVersion}/${filename}`;
return `https://github.com/shogo82148/actions-setup-mysql/releases/download/v${actionsVersion}/${filename}`;
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4ab5561

Please sign in to comment.