Skip to content

Commit

Permalink
build: remove shell config
Browse files Browse the repository at this point in the history
  • Loading branch information
wobsoriano committed Sep 16, 2023
1 parent 50b66ab commit a24cc9e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
19 changes: 15 additions & 4 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import dts from 'bun-plugin-dts'
import path from 'node:path'

const output = await Bun.build({
entrypoints: ['./src/index.ts'],
Expand All @@ -9,9 +10,19 @@ const output = await Bun.build({
],
})


const XGO = path.join(process.env.HOME, 'go/bin/xgo');
const TARGETS = 'linux/arm64,linux/amd64,darwin/arm64,darwin/amd64';

if (output.success) {
console.log('Building')
const proc = Bun.spawn(['bun', 'run', 'build:go'])
await proc.exited
console.log('build success')
console.log('Compiling native binaries...')
const proc = Bun.spawnSync([
XGO,
"-out", "release/blipgloss",
"--targets=" + TARGETS,
"-ldflags=-s -w",
"-buildmode=c-shared",
".",
]);
console.log(proc.stdout.toString())
}
6 changes: 0 additions & 6 deletions build.sh

This file was deleted.

0 comments on commit a24cc9e

Please sign in to comment.