Skip to content

Commit

Permalink
chore: include exe extension on windows azl buid
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsdev committed Sep 20, 2024
1 parent 6d3cb21 commit 5d0f88a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"build:cjs": "tsup --config ./tsup.cjs.config.ts && resolve-tspaths --out ./dist/cjs && shx cp ./package.cjs.json ./dist/cjs/package.json && renamer --find .d.cts --replace .d.ts ./dist/cjs/**/*.d.cts",
"build:scripts:cjs": "tsup --config ./tsup.scripts.cjs.config.ts && shx cp ./package.cli.json ./dist/scripts/cjs/package.json",
"build:cli": "npm run build:scripts:cjs && cross-env-shell pkg ./dist/scripts/cjs --out-path ./dist/binary -t node20-$PKG_TARGET --debug && npm run build:cli:azl",
"build:cli:azl": "cross-env go build -o ./dist/binary/azl ./azl.go",
"build:cli:azl": "tsx ./scripts/build-azl-go.ts",
"bundle:cli": "npm run build:cli && tsx ./scripts/bundle-cli.ts"
},
"keywords": [],
Expand Down
6 changes: 6 additions & 0 deletions scripts/build-azl-go.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { execSync } from "node:child_process"
import os from "node:os"

const cmd = `go build -o ./dist/binary/azl${os.platform() === "win32" ? ".exe" : ""} ./azl.go`

execSync(cmd, { stdio: "inherit" })

0 comments on commit 5d0f88a

Please sign in to comment.