chore: build & remove debug

This commit is contained in:
xHyroM 2022-07-11 10:16:10 +02:00
parent ce4c816086
commit 56e1130806
2 changed files with 4 additions and 10 deletions

View File

@ -3,7 +3,6 @@ import { addPath, info } from '@actions/core';
import getAsset from './getAsset.js';
import getHomeDir from './getHomeDir.js';
import { join } from 'path';
import { readdirSync } from 'fs';
export default async (release) => {
const cache = find('bun', release.tag_name);
if (cache) {
@ -14,12 +13,10 @@ export default async (release) => {
const asset = getAsset(release.assets);
info(`Downloading Bun from ${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);
info(`Cached Bun to ${newCache}.`);
addPath(newCache);
console.log(extracted);
const bunPath = join(getHomeDir(), ".bun", "bin", asset.name.replace('.zip', ''));
console.log(readdirSync(bunPath));
const bunPath = join(getHomeDir(), '.bun', 'bin', asset.name.replace('.zip', ''));
addPath(bunPath);
};

View File

@ -4,7 +4,6 @@ import { addPath, info } from '@actions/core';
import getAsset from './getAsset.js';
import getHomeDir from './getHomeDir.js';
import { join } from 'path';
import { readdirSync } from 'fs';
export default async(release: Release) => {
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}.`);
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,
@ -30,8 +29,6 @@ export default async(release: Release) => {
info(`Cached Bun to ${newCache}.`);
addPath(newCache);
console.log(extracted);
const bunPath = join(getHomeDir(), ".bun", "bin", asset.name.replace('.zip', ''));
console.log(readdirSync(bunPath));
const bunPath = join(getHomeDir(), '.bun', 'bin', asset.name.replace('.zip', ''));
addPath(bunPath);
}