Skip to content

Commit

Permalink
Add OpenBSD arm64 (#3674)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikmckenz authored Jun 30, 2024
1 parent b722000 commit 63eb814
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
indent_style = tab
indent_size = 2

[*.{js,ts}]
[*.{js,json,ts}]
indent_style = space
indent_size = 2
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ platform-all:
platform-linux-x64 \
platform-netbsd-x64 \
platform-neutral \
platform-openbsd-arm64 \
platform-openbsd-x64 \
platform-sunos-x64 \
platform-wasi-preview1 \
Expand Down Expand Up @@ -362,6 +363,9 @@ platform-freebsd-arm64:
platform-netbsd-x64:
@$(MAKE) --no-print-directory GOOS=netbsd GOARCH=amd64 NPMDIR=npm/@esbuild/netbsd-x64 platform-unixlike

platform-openbsd-arm64:
@$(MAKE) --no-print-directory GOOS=openbsd GOARCH=arm64 NPMDIR=npm/@esbuild/openbsd-arm64 platform-unixlike

platform-openbsd-x64:
@$(MAKE) --no-print-directory GOOS=openbsd GOARCH=amd64 NPMDIR=npm/@esbuild/openbsd-x64 platform-unixlike

Expand Down Expand Up @@ -439,6 +443,7 @@ publish-all: check-go-version
@read OTP && OTP="$$OTP" $(MAKE) --no-print-directory -j4 \
publish-freebsd-x64 \
publish-freebsd-arm64 \
publish-openbsd-arm64 \
publish-openbsd-x64 \
publish-netbsd-x64

Expand Down Expand Up @@ -519,6 +524,9 @@ publish-freebsd-arm64: platform-freebsd-arm64
publish-netbsd-x64: platform-netbsd-x64
test -n "$(OTP)" && cd npm/@esbuild/netbsd-x64 && npm publish --otp="$(OTP)"

publish-openbsd-arm64: platform-openbsd-arm64
test -n "$(OTP)" && cd npm/@esbuild/openbsd-arm64 && npm publish --otp="$(OTP)"

publish-openbsd-x64: platform-openbsd-x64
test -n "$(OTP)" && cd npm/@esbuild/openbsd-x64 && npm publish --otp="$(OTP)"

Expand Down Expand Up @@ -611,6 +619,7 @@ validate-builds:
@$(MAKE) --no-print-directory TARGET=platform-linux-s390x SCOPE=@esbuild/ PACKAGE=linux-s390x SUBPATH=bin/esbuild validate-build
@$(MAKE) --no-print-directory TARGET=platform-linux-x64 SCOPE=@esbuild/ PACKAGE=linux-x64 SUBPATH=bin/esbuild validate-build
@$(MAKE) --no-print-directory TARGET=platform-netbsd-x64 SCOPE=@esbuild/ PACKAGE=netbsd-x64 SUBPATH=bin/esbuild validate-build
@$(MAKE) --no-print-directory TARGET=platform-openbsd-arm64 SCOPE=@esbuild/ PACKAGE=openbsd-arm64 SUBPATH=bin/esbuild validate-build
@$(MAKE) --no-print-directory TARGET=platform-openbsd-x64 SCOPE=@esbuild/ PACKAGE=openbsd-x64 SUBPATH=bin/esbuild validate-build
@$(MAKE) --no-print-directory TARGET=platform-sunos-x64 SCOPE=@esbuild/ PACKAGE=sunos-x64 SUBPATH=bin/esbuild validate-build
@$(MAKE) --no-print-directory TARGET=platform-wasi-preview1 SCOPE=@esbuild/ PACKAGE=wasi-preview1 SUBPATH=esbuild.wasm validate-build
Expand Down Expand Up @@ -646,6 +655,7 @@ clean:
rm -rf npm/@esbuild/linux-s390x/bin
rm -rf npm/@esbuild/linux-x64/bin
rm -rf npm/@esbuild/netbsd-x64/bin
rm -rf npm/@esbuild/openbsd-arm64/bin
rm -rf npm/@esbuild/openbsd-x64/bin
rm -rf npm/@esbuild/sunos-x64/bin
rm -rf npm/esbuild-wasm/esm
Expand Down
1 change: 1 addition & 0 deletions dl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ case $platform in
'Linux arm64' | 'Linux aarch64') curl -fo "$tgz" "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-$ESBUILD_VERSION.tgz";;
'Linux x86_64') curl -fo "$tgz" "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-$ESBUILD_VERSION.tgz";;
'NetBSD amd64') curl -fo "$tgz" "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-$ESBUILD_VERSION.tgz";;
'OpenBSD arm64') curl -fo "$tgz" "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-$ESBUILD_VERSION.tgz";;
'OpenBSD amd64') curl -fo "$tgz" "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-$ESBUILD_VERSION.tgz";;
*) echo "error: Unsupported platform: $platform"; exit 1
esac
Expand Down
1 change: 1 addition & 0 deletions lib/npm/node-platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const knownUnixlikePackages: Record<string, string> = {
'linux x64 LE': '@esbuild/linux-x64',
'linux loong64 LE': '@esbuild/linux-loong64',
'netbsd x64 LE': '@esbuild/netbsd-x64',
'openbsd arm64 LE': '@esbuild/openbsd-arm64',
'openbsd x64 LE': '@esbuild/openbsd-x64',
'sunos x64 LE': '@esbuild/sunos-x64',
}
Expand Down
3 changes: 3 additions & 0 deletions npm/@esbuild/openbsd-arm64/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# esbuild

This is the OpenBSD ARM 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.
20 changes: 20 additions & 0 deletions npm/@esbuild/openbsd-arm64/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "@esbuild/openbsd-arm64",
"version": "0.20.2",
"description": "The OpenBSD ARM 64-bit binary for esbuild, a JavaScript bundler.",
"repository": {
"type": "git",
"url": "git+https://github.com/evanw/esbuild.git"
},
"license": "MIT",
"preferUnplugged": true,
"engines": {
"node": ">=12"
},
"os": [
"openbsd"
],
"cpu": [
"arm64"
]
}

0 comments on commit 63eb814

Please sign in to comment.