Skip to content

Commit

Permalink
Officially support windows/arm64 (vercel#1118)
Browse files Browse the repository at this point in the history
* Attempt supporting Windows/arm64.

* Update esbuild.
  • Loading branch information
nathanhammond authored Apr 26, 2022
1 parent 84a3f80 commit c523daf
Show file tree
Hide file tree
Showing 6 changed files with 232 additions and 38 deletions.
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "benchmark",
"version": "1.0.0",
"dependencies": {
"esbuild": "^0.14.21",
"esbuild": "^0.14.38",
"esbuild-register": "^3.3.2",
"fs-extra": "^10.0.0"
},
Expand Down
25 changes: 15 additions & 10 deletions cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ platform-all: cmd/turbo/version.go
platform-create-turbo


platform-windows:
cd npm/turbo-windows-64 && npm version "$(TURBO_VERSION)" --allow-same-version
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(GO_FLAGS) -o npm/turbo-windows-64/turbo.exe ./cmd/turbo

platform-windows-32:
cd npm/turbo-windows-32 && npm version "$(TURBO_VERSION)" --allow-same-version
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build $(GO_FLAGS) -o npm/turbo-windows-32/turbo.exe ./cmd/turbo

platform-windows-64:
cd npm/turbo-windows-64 && npm version "$(TURBO_VERSION)" --allow-same-version
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(GO_FLAGS) -o npm/turbo-windows-64/turbo.exe ./cmd/turbo

platform-windows-arm64:
cd npm/turbo-windows-32 && npm version "$(TURBO_VERSION)" --allow-same-version
CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build $(GO_FLAGS) -o npm/turbo-windows-arm64/turbo.exe ./cmd/turbo
cd npm/turbo-windows-arm64 && npm version "$(TURBO_VERSION)" --allow-same-version
CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build $(GO_FLAGS) -o npm/turbo-windows-arm64/turbo.exe ./cmd/turbo

platform-unixlike:
test -n "$(GOOS)" && test -n "$(GOARCH)" && test -n "$(NPMDIR)"
Expand Down Expand Up @@ -167,8 +167,9 @@ publish-all: cmd/turbo/version.go
@test "" = "`git cherry`" || (echo "Refusing to publish with unpushed commits" && false)
rm -fr npm && git checkout npm
@echo Enter one-time password:
make publish-windows
make publish-windows-32
make publish-windows-64
make publish-windows-arm64
make publish-freebsd
make publish-freebsd-arm64
@echo Enter one-time password:
Expand All @@ -193,12 +194,15 @@ publish-all: cmd/turbo/version.go
git tag "v$(TURBO_VERSION)"
git push origin main "v$(TURBO_VERSION)"

publish-windows: platform-windows
make test && cd npm/turbo-windows-64 && npm publish --tag $(TURBO_TAG)

publish-windows-32: platform-windows-32
make test && cd npm/turbo-windows-32 && npm publish --tag $(TURBO_TAG)

publish-windows-64: platform-windows-64
make test && cd npm/turbo-windows-64 && npm publish --tag $(TURBO_TAG)

publish-windows-arm64: platform-windows-arm64
make test && cd npm/turbo-windows-arm64 && npm publish --tag $(TURBO_TAG)

publish-darwin: platform-darwin
make test && cd npm/turbo-darwin-64 && npm publish --tag $(TURBO_TAG)

Expand Down Expand Up @@ -285,6 +289,7 @@ clean:
rm -rf npm/turbo-linux-ppc64le/bin/turbo
rm -rf npm/turbo-windows-32/turbo.exe
rm -rf npm/turbo-windows-64/turbo.exe
rm -rf npm/turbo-windows-arm64/turbo.exe
rm -rf docs/.turbo
rm -rf docs/.next
rm -rf docs/node_modules
Expand Down
2 changes: 1 addition & 1 deletion cli/npm/turbo-install/node-platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const path = require("path");
const TURBO_BINARY_PATH = process.env.TURBO_BINARY_PATH;

const knownWindowsPackages = {
// "win32 arm64 LE": "turbo-windows-arm64",
"win32 arm64 LE": "turbo-windows-arm64",
"win32 ia32 LE": "turbo-windows-32",
"win32 x64 LE": "turbo-windows-64",
};
Expand Down
4 changes: 2 additions & 2 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"devDependencies": {
"cross-env": "^7.0.3",
"copy-template-dir": "^1.4.0",
"esbuild": "^0.8.54",
"esbuild-register": "^2.5.0",
"esbuild": "^0.14.38",
"esbuild-register": "^3.3.2",
"execa": "^5.0.0",
"expect": "^26.6.2",
"faker": "^5.1.0",
Expand Down
3 changes: 2 additions & 1 deletion examples/kitchen-sink/apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"@types/morgan": "^1.9.2",
"@types/node": "^15.12.2",
"@types/supertest": "^2.0.11",
"esbuild-register": "^2.5.0",
"esbuild": "^0.14.38",
"esbuild-register": "^3.3.2",
"nodemon": "^2.0.15",
"scripts": "*",
"jest": "^26.6.3",
Expand Down
Loading

0 comments on commit c523daf

Please sign in to comment.