mirror of
https://github.com/oven-sh/setup-bun.git
synced 2025-02-23 10:40:10 +08:00
chore: remove debugging, build
This commit is contained in:
parent
9bbc376c40
commit
bf0dbd9f81
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@ -26,4 +26,14 @@ jobs:
|
|||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Try bun
|
- name: Try bun
|
||||||
run: bun add types
|
run: bun add types
|
||||||
|
|
||||||
|
test-mac:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup Bun
|
||||||
|
run: curl https://bun.sh/install | bash
|
||||||
|
|
||||||
|
- name: Try bun
|
||||||
|
run: bun
|
4
dist/utils/install.js
vendored
4
dist/utils/install.js
vendored
@ -4,16 +4,12 @@ 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 asset = getAsset(release.assets);
|
const asset = getAsset(release.assets);
|
||||||
const path = join(getHomeDir(), '.bun', 'bin', asset.name);
|
const path = join(getHomeDir(), '.bun', 'bin', asset.name);
|
||||||
console.log(path);
|
|
||||||
const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}-${release.version}`);
|
const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}-${release.version}`);
|
||||||
if (cache) {
|
if (cache) {
|
||||||
info(`Using cached Bun installation from ${cache}.`);
|
info(`Using cached Bun installation from ${cache}.`);
|
||||||
console.log(path);
|
|
||||||
console.log(readdirSync(path));
|
|
||||||
addPath(path);
|
addPath(path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -5,17 +5,13 @@ 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 asset = getAsset(release.assets);
|
const asset = getAsset(release.assets);
|
||||||
const path = join(getHomeDir(), '.bun', 'bin', asset.name);
|
const path = join(getHomeDir(), '.bun', 'bin', asset.name);
|
||||||
console.log(path);
|
|
||||||
const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}-${release.version}`);
|
const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}-${release.version}`);
|
||||||
if (cache) {
|
if (cache) {
|
||||||
info(`Using cached Bun installation from ${cache}.`);
|
info(`Using cached Bun installation from ${cache}.`);
|
||||||
console.log(path);
|
|
||||||
console.log(readdirSync(path));
|
|
||||||
addPath(path);
|
addPath(path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user