build: replace upstream team-list dependency, add neuron launcher preferring compiled binary
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Neuron launcher: run the CLI from source under Bun.
|
||||
# Neuron launcher: prefer the compiled binary from a local build,
|
||||
# fall back to running from source under Bun.
|
||||
SELF="$0"
|
||||
while [ -L "$SELF" ]; do
|
||||
LINK="$(readlink "$SELF")"
|
||||
@@ -9,4 +10,14 @@ while [ -L "$SELF" ]; do
|
||||
esac
|
||||
done
|
||||
DIR="$(cd "$(dirname "$SELF")" && pwd)"
|
||||
exec bun run --conditions=browser "$DIR/../src/index.ts" "$@"
|
||||
PKG="$DIR/.."
|
||||
ARCH=$(uname -m)
|
||||
case "$ARCH" in
|
||||
arm64) TARGET="opencode-darwin-arm64" ;;
|
||||
x86_64) TARGET="opencode-darwin-x64" ;;
|
||||
*) TARGET="" ;;
|
||||
esac
|
||||
if [ -n "$TARGET" ] && [ -x "$PKG/dist/$TARGET/bin/opencode" ]; then
|
||||
exec "$PKG/dist/$TARGET/bin/opencode" "$@"
|
||||
fi
|
||||
exec bun run --conditions=browser "$PKG/src/index.ts" "$@"
|
||||
|
||||
@@ -47,15 +47,8 @@ const VERSION = await (async () => {
|
||||
return `${major}.${minor}.${patch + 1}`
|
||||
})()
|
||||
|
||||
const bot = ["actions-user", "opencode", "opencode-agent[bot]"]
|
||||
const teamPath = path.resolve(import.meta.dir, "../../../.github/TEAM_MEMBERS")
|
||||
const team = [
|
||||
...(await Bun.file(teamPath)
|
||||
.text()
|
||||
.then((x) => x.split(/\r?\n/).map((x) => x.trim()))
|
||||
.then((x) => x.filter((x) => x && !x.startsWith("#")))),
|
||||
...bot,
|
||||
]
|
||||
// Neuron fork: upstream's TEAM_MEMBERS list is gone; maintain the bot list only.
|
||||
const team = ["neuron"]
|
||||
|
||||
export const Script = {
|
||||
get channel() {
|
||||
|
||||
Reference in New Issue
Block a user