Skip to content

Commit

Permalink
Windows server packaging
Browse files Browse the repository at this point in the history
Summary: ^

Reviewed By: passy

Differential Revision: D47833317

fbshipit-source-id: b500f58b4ef0e201d8a711f3a83774fa82a7199b
  • Loading branch information
lblasa authored and facebook-github-bot committed Jul 27, 2023
1 parent 566125a commit dc0fd0a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions desktop/scripts/build-flipper-server-release.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ cd "$THIS_DIR"
./node ./server "$@"
`;

const WINDOWS_STARTUP_SCRIPT = `@echo off
setlocal
set "THIS_DIR=%~dp0"
cd /d "%THIS_DIR%"
node server %*
`;

const argv = yargs
.usage('yarn build-flipper-server [args]')
.version(false)
Expand Down Expand Up @@ -618,6 +625,12 @@ async function setUpLinuxBundle(outputDir: string) {

async function setUpWindowsBundle(outputDir: string) {
console.log(`⚙️ Creating Windows bundle in ${outputDir}`);
await fs.writeFile(
path.join(outputDir, 'flipper.bat'),
WINDOWS_STARTUP_SCRIPT,
);
// Give the script +x
await fs.chmod(path.join(outputDir, 'flipper.bat'), 0o755);
}

async function setUpMacBundle(
Expand Down

0 comments on commit dc0fd0a

Please sign in to comment.