Skip to content

Commit d71abd5

Browse files
authored
FF-000 - Add Windows platform support for Fly CLI binary (#25)
1 parent c5c039a commit d71abd5

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

bin/fly-win32-arm64.exe

19.5 MB
Binary file not shown.

bin/fly-win32-x64.exe

21.2 MB
Binary file not shown.

lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ const constants_1 = __nccwpck_require__(9920);
7979
* Resolves the platform-specific Fly binary path and ensures it is executable
8080
*/
8181
function resolveFlyCLIBinaryPath() {
82-
const binName = `fly-${process.platform}-${process.arch}`;
82+
const ext = process.platform === "win32" ? ".exe" : "";
83+
const binName = `fly-${process.platform}-${process.arch}${ext}`;
8384
const binPath = path.resolve(__dirname, "..", "bin", binName);
8485
if (!fs.existsSync(binPath)) {
8586
throw new Error(`Fly CLI binary not found at ${binPath} for ${process.platform}/${process.arch}. Ensure it is present in the 'bin' directory of the action.`);

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import {
1919
* Resolves the platform-specific Fly binary path and ensures it is executable
2020
*/
2121
export function resolveFlyCLIBinaryPath(): string {
22-
const binName = `fly-${process.platform}-${process.arch}`;
22+
const ext = process.platform === "win32" ? ".exe" : "";
23+
const binName = `fly-${process.platform}-${process.arch}${ext}`;
2324
const binPath = path.resolve(__dirname, "..", "bin", binName);
2425
if (!fs.existsSync(binPath)) {
2526
throw new Error(

src/integration-tests/fly-client.integration.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,8 @@ describe("Fly client cross-platform check", () => {
489489
"fly-darwin-x64",
490490
"fly-linux-arm64",
491491
"fly-linux-x64",
492+
"fly-win32-arm64.exe",
493+
"fly-win32-x64.exe",
492494
];
493495

494496
expectedBinaries.forEach((binName) => {

0 commit comments

Comments
 (0)