pantry/projects/bun.sh/package.yml
Jacob Heider 0177eafc70
fix(bun)
2023-04-15 03:49:28 -04:00

48 lines
1.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

distributable:
url: https://github.com/oven-sh/bun/archive/refs/tags/bun-v{{version}}.tar.gz
warnings:
- vendored
versions:
github: oven-sh/bun/releases
strip: /^Bun /
#FIXME proper system for re-using pre-built binaries
# we must require the vendor to provide signatures against a published public
# key. If they dont then really we should build ourselves or warn the user
# about the fact.
# The thing is, we trust the sources implicitly currently because signing is
# so rare. The only way wide spread signing will occur is via our protocol.
build:
dependencies:
curl.se: '*'
info-zip.org/unzip: '*'
working-directory: ${{prefix}}
script: |
curl -Lfo bun.zip "https://github.com/oven-sh/bun/releases/download/bun-v{{version}}/bun-$PLATFORM.zip"
unzip bun.zip
mv bun-$PLATFORM bin
rm bun.zip
cd bin
ln -s bun bunx
env:
darwin/aarch64: {PLATFORM: darwin-aarch64}
darwin/x86-64: {PLATFORM: darwin-x64}
linux/aarch64: {PLATFORM: linux-aarch64}
linux/x86-64: {PLATFORM: linux-x64}
test: |
if test "{{hw.platform}}+{{hw.arch}}" != "darwin+x86-64"; then
# bun hangs in CI/CD for this platform (BUT WORKS LOCALLY LOL)
bun --help
fi
# bunx shx ls
# ^^ tries to run `node` for some reason
#TODO a reasonable test for `bunx` that works ffs
provides:
- bin/bun
- bin/bunx