mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-02-23 18:50:10 +08:00
chore: build & remove debug
This commit is contained in:
parent
ce4c816086
commit
56e1130806
7
dist/utils/install.js
vendored
7
dist/utils/install.js
vendored
@ -3,7 +3,6 @@ import { addPath, info } from '@actions/core';
|
|||||||
import getAsset from './getAsset.js';
|
import getAsset from './getAsset.js';
|
||||||
import getHomeDir from './getHomeDir.js';
|
import getHomeDir from './getHomeDir.js';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import { readdirSync } from 'fs';
|
|
||||||
export default async (release) => {
|
export default async (release) => {
|
||||||
const cache = find('bun', release.tag_name);
|
const cache = find('bun', release.tag_name);
|
||||||
if (cache) {
|
if (cache) {
|
||||||
@ -14,12 +13,10 @@ export default async (release) => {
|
|||||||
const asset = getAsset(release.assets);
|
const asset = getAsset(release.assets);
|
||||||
info(`Downloading Bun from ${asset.asset.browser_download_url}.`);
|
info(`Downloading Bun from ${asset.asset.browser_download_url}.`);
|
||||||
const zipPath = await downloadTool(asset.asset.browser_download_url);
|
const zipPath = await downloadTool(asset.asset.browser_download_url);
|
||||||
const extracted = await extractZip(zipPath, join(getHomeDir(), ".bun", "bin"));
|
const extracted = await extractZip(zipPath, join(getHomeDir(), '.bun', 'bin'));
|
||||||
const newCache = await cacheDir(extracted, 'bun', release.tag_name);
|
const newCache = await cacheDir(extracted, 'bun', release.tag_name);
|
||||||
info(`Cached Bun to ${newCache}.`);
|
info(`Cached Bun to ${newCache}.`);
|
||||||
addPath(newCache);
|
addPath(newCache);
|
||||||
console.log(extracted);
|
const bunPath = join(getHomeDir(), '.bun', 'bin', asset.name.replace('.zip', ''));
|
||||||
const bunPath = join(getHomeDir(), ".bun", "bin", asset.name.replace('.zip', ''));
|
|
||||||
console.log(readdirSync(bunPath));
|
|
||||||
addPath(bunPath);
|
addPath(bunPath);
|
||||||
};
|
};
|
||||||
|
@ -4,7 +4,6 @@ import { addPath, info } from '@actions/core';
|
|||||||
import getAsset from './getAsset.js';
|
import getAsset from './getAsset.js';
|
||||||
import getHomeDir from './getHomeDir.js';
|
import getHomeDir from './getHomeDir.js';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
import { readdirSync } from 'fs';
|
|
||||||
|
|
||||||
export default async(release: Release) => {
|
export default async(release: Release) => {
|
||||||
const cache = find('bun', release.tag_name);
|
const cache = find('bun', release.tag_name);
|
||||||
@ -19,7 +18,7 @@ export default async(release: Release) => {
|
|||||||
info(`Downloading Bun from ${asset.asset.browser_download_url}.`);
|
info(`Downloading Bun from ${asset.asset.browser_download_url}.`);
|
||||||
|
|
||||||
const zipPath = await downloadTool(asset.asset.browser_download_url);
|
const zipPath = await downloadTool(asset.asset.browser_download_url);
|
||||||
const extracted = await extractZip(zipPath, join(getHomeDir(), ".bun", "bin"));
|
const extracted = await extractZip(zipPath, join(getHomeDir(), '.bun', 'bin'));
|
||||||
|
|
||||||
const newCache = await cacheDir(
|
const newCache = await cacheDir(
|
||||||
extracted,
|
extracted,
|
||||||
@ -30,8 +29,6 @@ export default async(release: Release) => {
|
|||||||
info(`Cached Bun to ${newCache}.`);
|
info(`Cached Bun to ${newCache}.`);
|
||||||
addPath(newCache);
|
addPath(newCache);
|
||||||
|
|
||||||
console.log(extracted);
|
const bunPath = join(getHomeDir(), '.bun', 'bin', asset.name.replace('.zip', ''));
|
||||||
const bunPath = join(getHomeDir(), ".bun", "bin", asset.name.replace('.zip', ''));
|
|
||||||
console.log(readdirSync(bunPath));
|
|
||||||
addPath(bunPath);
|
addPath(bunPath);
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user