Skip to content

Commit

Permalink
chore: mkdir artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
sun0day committed Dec 16, 2023
1 parent c356dcd commit cc867e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/artifacts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ bindings.forEach(async (dir, index) => {
// move binaries
const bins = await fg('**/*.node', {cwd: join(dir, './packages')})
let cmd = `echo "mv ${dir} bins"`
bins.forEach(bin => {
await Promise.all(bins.map(async bin => {
const [pkg, file] = bin.split('/')
createDir(join('packages', pkg, dir), './')
await createDir(join('packages', pkg, dir), './')
cmd = [cmd, `mv ${join(dir, 'packages', bin)} ${join('packages', pkg, dir, file)}`].join(' && ')
})
}))

execSync(cmd, {stdio: 'inherit'})

// move js
if(index === 0) {
const jss = await fg('**/core.*', {cwd: (dir, './packages')})
const jss = await fg('**/core.*', {cwd: join(dir, './packages')})
cmd = `echo "mv ${dir} js"`
jss.forEach(js => {
const [pkg, file] = js.split('/')
Expand Down

0 comments on commit cc867e2

Please sign in to comment.