HomePhabricator
Diffusion Comm 1d332ea54def

[native] Make native build on Windows

Description

[native] Make native build on Windows

Summary:
Part of ENG-2457.
We want to be able to build the desktop app on Windows but currently, the postinstall script of native workspace doesn't work on Windows:

  • it uses the bash syntax (and on windows postinstall runs under cmd.exe)
  • there are some problems with paths when it comes to patch-package because of some symlink weirdness in node_modules

This diff moves the postinstall logic into a separate script file and runs it with bash explicitly. If we are on windows we skip everything (we are only going to be building the desktop app).
This will work on windows provided there's a bash executable in PATH, thankfully that's true for windows github runners (bash is included in the git for windows).

Additionally, we skip pod install if we aren't on macOS instead of using || true which hides errors.

Test Plan:

  • yarn cleaninstall on macOS laptop works
  • CI on phab works
  • yarn cleaninstall on Windows laptop and on GitHub Windows Runner (in a forked repo) works

Reviewers: atul, varun, jon, O2 Blocking Reviewers, tomek

Reviewed By: jon, O2 Blocking Reviewers, tomek

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D6142

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Dec 29 2022, 5:56 AM
Reviewer
Restricted Owners Package
Differential Revision
D6142: [native] Make native build on Windows
Parents
rCOMMc13c35676480: [keyserver] Store `SIWESocialProof` in `social_proof` column of `cookies` table
Branches
Unknown
Tags
Unknown

Event Timeline

Michal Gniadek <michal.gniadek@swmansion.com> committed rCOMM1d332ea54def: [native] Make native build on Windows (authored by Michal Gniadek <michal.gniadek@swmansion.com>).Jan 5 2023, 7:15 AM