Commit Graph

80 Commits

Author SHA1 Message Date
Pascal Hartig
bc4fc12ea4 Add prebuilt version of stricter
Summary:
Adds a binary we can run on Sandcastle.

allow-large-files

Reviewed By: danielbuechele

Differential Revision: D17093672

fbshipit-source-id: 3695739a65aea72bc8c8268404c9d3e025349e16
2019-08-28 14:31:33 -07:00
Pascal Hartig
a612792995 Add script to watch for TSC strict mode regressions
Summary:
This is a simple script that runs `tsc --strict` twice: on the current revision and the previous one, compares the number of errors and if there are more, prints them out and raises a failure exit code.

This should help us ensure that while we clean up the 500-odd errors we don't land more in the process.

Reviewed By: danielbuechele

Differential Revision: D17093671

fbshipit-source-id: 6c5d1424c729d15d66a32ae17f15b17c3b76fc68
2019-08-28 14:31:33 -07:00
Daniel Büchele
f69bfab0f4 npm
Summary:
Publishing flipper to npm via Sandcastle.
- NPM token added to secrets tool
- removing private flag from package JSON
- adding publish script

Reviewed By: passy

Differential Revision: D16984934

fbshipit-source-id: 334991381d4035928af9a9d98d3905280938736a
2019-08-23 09:33:56 -07:00
Daniel Büchele
853d80f182 headless
Summary: _typescript_

Reviewed By: passy

Differential Revision: D16962733

fbshipit-source-id: 6583c5a4471b12f91895f6449ed9c510265a63e2
2019-08-23 09:33:56 -07:00
Pritesh Nandgaonkar
d850f1ff43 Update the bump version script
Summary: Updates the bump_version script to update the flipperkit version in Tutorial's Podfile.

Reviewed By: passy

Differential Revision: D16916433

fbshipit-source-id: dd5cf24fbbe4e9ca322178632613caebe178cc17
2019-08-20 08:41:30 -07:00
Daniel Büchele
d0da0d66a5 main folder
Summary: _typescript_

Reviewed By: passy

Differential Revision: D16762117

fbshipit-source-id: b6ee32e0bb3fc686fc69cfccab703e2ef4989571
2019-08-15 03:33:06 -07:00
Daniel Büchele
16e913a819 local icons
Summary:
Currently icons were always fetched remotely. We used a service worker to prefetch and cache some icons, that were critical to the UI.

In this diff, we are bundling icons at build time, with the app. In utils/icons.js we still specfify the list of icons which should be bundled. These are downloaded as part of the build step and bundled with the app. We are downloading the icons in 1x and 2x (the two most common pixel densities).

Reviewed By: jknoxville

Differential Revision: D16620764

fbshipit-source-id: 965a7793ad1f08aebb292606add00218429cdaf4
2019-08-02 09:00:00 -07:00
John Knox
df55ac263d Make android file pulling script public
Summary: This could be useful for OSS users, e.g. https://github.com/facebook/flipper/issues/498

Reviewed By: passy

Differential Revision: D16457362

fbshipit-source-id: 73fad6a30383f622e49cecc3a20d7fbbec2b318b
2019-07-24 06:25:40 -07:00
John Knox
5d99817555 Add --no-plugins arg to speed up headless development
Summary:
Compiling headless flipper takes a long time. This is because it individually compiles and bundles every plugin.

When debugging core headless, you don't need to compile any plugins, so this adds a build flag `--no-plugins` to skip that and vastly speed up iteration speed.

Reduces build time from 3 minutes to 20s

Reviewed By: priteshrnandgaonkar

Differential Revision: D16131322

fbshipit-source-id: 2b38ee37183a1257b3993f392cf623b2631fd7da
2019-07-05 08:09:18 -07:00
Pascal Hartig
4aafc49aaf Remove unneeded pod instructions from release script
Summary: Per title.

Reviewed By: jknoxville

Differential Revision: D15964257

fbshipit-source-id: 7f5888cff480df3a598d703b0f2c58bc9fa0ab89
2019-06-24 06:24:01 -07:00
Andres Suarez
198841d1d7 Rename uses of install-node-modules.sh in fbsource
Differential Revision: D15848788

fbshipit-source-id: b98626083ed7aee108f27d6e8c5c7b637e1b2327
2019-06-17 06:07:19 -07:00
Pascal Hartig
b8f3729752 Update Mac binary
Summary: Checking in a new binary pre-compiled for MacOS.

Reviewed By: jknoxville

Differential Revision: D15374540

fbshipit-source-id: a69e6f497a8c8b9f08144e1482450ff43b85f5da
2019-05-17 02:36:18 -07:00
Pascal Hartig
704634768f Update bump binary for Linux
Summary: This is the one used on sandcastle, built statically.

Reviewed By: jknoxville

Differential Revision: D15374415

fbshipit-source-id: 7b200e8630ce0a3a336cc46df26df367ed712fa1
2019-05-17 02:36:18 -07:00
Pascal Hartig
85f06c53eb Bump noop versions
Summary:
When running bump, also update the docs references to the noop package.

Will update binaries in subsequent diffs.

Reviewed By: jknoxville

Differential Revision: D15374370

fbshipit-source-id: 5558d33a91dc5e690f5754891b2e5aa29385646a
2019-05-17 02:36:17 -07:00
Pritesh Nandgaonkar
31542ca790 Update the open source release script
Summary: We no longer require to host the pods on our repository, thus I updated the release script to get rid off the copying part.

Reviewed By: passy

Differential Revision: D15166526

fbshipit-source-id: 1989eff335f83c191b16a78d9562470d7819bc17
2019-05-02 04:58:38 -07:00
Pascal Hartig
cfb4f52359 Automatically release noop packages
Summary: This is used by the public Circle CI release task.

Reviewed By: jknoxville

Differential Revision: D15149586

fbshipit-source-id: de631f930649fdbe582d525874ac6a6bf1fd4bad
2019-05-01 08:38:23 -07:00
Pascal Hartig
1831a672b5 More copyright headers for misc stuff
Summary: Scripts and Portforwarding things.

Reviewed By: jknoxville

Differential Revision: D15164852

fbshipit-source-id: a9dcdcb5e6c19dc51d1aa0158fceafe21ab7615f
2019-05-01 08:14:55 -07:00
Pascal Hartig
939cc531e2 Fix revision bundling
Summary:
This fixes headless not terminating due to the `package.json` not being readable.
I instead write this to the `global` object in the same way that the version is
set.

Reviewed By: jknoxville

Differential Revision: D14579316

fbshipit-source-id: 238afe912366c423552305e120088f4abac4c20b
2019-03-22 10:41:01 -07:00
Pascal Hartig
c2b6df7c3b Use prefixed temp folder
Summary:
I'm accumulating a lot of those in my tmpfs and
it would be great to immediately identify the
ones coming from Flipper.

Reviewed By: danielbuechele

Differential Revision: D14406809

fbshipit-source-id: 6b74e8260a841d5db76ac34643ee0226abba735a
2019-03-13 03:40:06 -07:00
Pascal Hartig
1b1d349dba Add revision to build manifest
Summary:
Package up the current repository's revision when building
a release.

This will then be used to write it into exported traces
so we can find a compatible version when opening it up
again.

Reviewed By: danielbuechele

Differential Revision: D14406684

fbshipit-source-id: 761a51e69adbcab1d541c2daa78c9827ea299e79
2019-03-13 03:40:06 -07:00
Pascal Hartig
31c240ba00 Blacklist dist/ from devserver
Summary:
Having previously run `yarn build` can otherwise
cause your devserver to stop working.

Caveat: If you have a Flipper checkout and it's called neither `sonar` nor `flipper`, you're still screwed.

Reviewed By: danielbuechele

Differential Revision: D14364984

fbshipit-source-id: 1652c94a95b1dcb6d34bb9040a9cd4cd70c6df55
2019-03-07 05:47:32 -08:00
Pascal Hartig
f0722287be Fix Mac ZIP building
Summary:
The current Mac zip creation in electron-builder is broken and creates corrupt zip builder. Other platforms are still fine. This just zips stuff up manually and ensures that symlinks are preserved.

Thanks a lot to Daniel Büchele for helping me wrap my head around untyped promises.

Reviewed By: jknoxville

Differential Revision: D14243002

fbshipit-source-id: 908d176275e5d22173e587c0eb4d7c4b2b7c2e0f
2019-02-27 15:07:46 -08:00
Daniel Büchele
520ffec7c9 removing entry, rootDir from defaultPlugins
Summary:
When bundling default plugins, we create a JSON-file containing information about the plugin and where to require it from. This information contained two filed: `entry` and `rootDir`, which were written while bundling the plugins. Because the plugins are bundled on Sandcastle, this was a path on the Sandcastle machine.

This also happened for the OSS version, see the screenshot from a GitHub issue.
Entry and rootDir are only used during the build process and not needed afterwards, so it is save to remove them from the JSON.

https://pxl.cl/qQSx

Reviewed By: passy

Differential Revision: D14165679

fbshipit-source-id: 4e7c5ac25652758ccfc3a459f4dd197254c6f897
2019-02-21 09:39:54 -08:00
Daniel Büchele
13f7444013 electron update
Summary:
Started with upgrading electron from 3.0.0 to 4.0.5. This required a bunch of subsequent updates:
* upgrading `electron-builder` to latest version, because the old version couldn't build electron 4 apps.
  * `appDir` is deprecated in builder config, `projectDir` is used instead, which we already had set, so its fine to just remove this ([see GitHub commit](a5e457163e)).
* upgrading `jest-runner/electron` because the old version couldn't run electron 4 tests.
  * upgrading our custom dependency resolution to use electron 4.0.5, because the test runner still resolves to 2.0.8 ([see GitHub issue](https://github.com/facebook-atom/jest-electron-runner/issues/31)).
* updating `sandcastle.sh` to use the new cache files from D14131344.
* removing `package-lock.json` as is was causing warnings. We use `yarn` and `yarn.lock` anyways. This file must have been committed by accident.
* updating our check to only run one version of Flipper at a time to use the new electron API `app.requestSingleInstanceLock` as the old one was removed in electron 4.
* updating the snapshot test that checks App rendering, which changed a little due to the electron upgrade.
* upgrading flow-type definitions to `electron-v4.0.5.js` generated by [electron-flowtype-definitions](https://github.com/danielbuechele/electron-flowtype-definitions).

**PS: Best new feature in Electron 4: Copy&paste working in dev tools**

Reviewed By: jknoxville

Differential Revision: D14131360

fbshipit-source-id: d7ed9643875629a1fa1860bb61b11dd0c64112ab
2019-02-21 02:46:12 -08:00
Daniel Büchele
6ada04bc38 ignore flipper-public/dist folder in build
Summary:
Builds in flipper-public are failing, because duplicate imports: https://our.intern.facebook.com/intern/sandcastle/job/22517998213713260

That's most likely because the `flipper-public` is not blacklisted in metro, so let's add it!

Reviewed By: passy

Differential Revision: D14134423

fbshipit-source-id: 52f87196957c8578b8ac7f578efa74e3c13fe1bb
2019-02-20 06:58:54 -08:00
Daniel Büchele
825bfffd21 create one headless file for all platforms
Summary: We are distributing a single package via fbpkg containing the headless version linux and macOS. This changes the build process to only create a single zip-file containing these binaries.

Reviewed By: passy

Differential Revision: D14042031

fbshipit-source-id: 88992f17501353a70bc21799c6bd2957576268a3
2019-02-12 06:18:56 -08:00
Daniel Büchele
e78bd57514 build headless
Summary:
- create a zip-file when building the headless version of Flipper
- restore pkg cache in Sandcastle from pantri
- run build script in sandcastle.

Changes need to go together with D13942919

Reviewed By: passy

Differential Revision: D13942701

fbshipit-source-id: caac7d6cda99fec2a6836c652957ff609a0bf8bb
2019-02-05 11:35:52 -08:00
Daniel Büchele
22f9401e05 move version number to build-utils
Summary:
* The generation of the version number is moved to build-utils so it can be used from the headless build process as well.
* The prelude script for the headless version exposes the version number on `global.__VERSION__`
* While at this file, moving some functions in the build process to use the Sync version. Doesn't matter for the build process anyways and the syntax is much nicer.

Reviewed By: passy

Differential Revision: D13843678

fbshipit-source-id: 7df8364044ab6ebc83a4060aab2e3a42ae48a934
2019-02-04 07:29:13 -08:00
Daniel Büchele
5b68c59b5c package bundle
Summary:
For the electron build, plugins are bundled with the app and loaded from there at launch. The headless version can't require from its binary, so plugins need to be required from another path.

This diff makes the path where bundled plugins are loaded from adjustable via an environment variable: `BUNDLED_PLUGIN_PATH`. If it's set, the plugins are loaded from this path, otherwise we default to the old behaviour of including them from `./defaultPlugins`.

For the headless version we expect the plugins to be in a folder called `plugins` next to the executable. This should later be configurable via an argument passed to the CLI.

Reviewed By: passy

Differential Revision: D13843676

fbshipit-source-id: 04237ae6631b4f2ba56887fe992a56f860724edc
2019-02-04 07:29:13 -08:00
Daniel Büchele
d512c97cab package bundle
Summary:
Building binaries for the headless version of Flipper. These binaries include node, so they can be run independent on any system.

allow-large-files

Reviewed By: passy

Differential Revision: D13843677

fbshipit-source-id: c053177328ddfcba11f9a293951ebe4db4d84034
2019-02-04 07:29:13 -08:00
Pascal Hartig
14b1583eb0 Adjust verify-bintrya-upload script for Flipper
Summary:
Umm, this is embarrassing. I thouhgt I did this when I put
up the first diff? Apparently I didn't. Well, I just ran
this for `0.14.2` and now it actually does what it
says on the tin.

Reviewed By: danielbuechele

Differential Revision: D13861574

fbshipit-source-id: dd7ae30a97e6da036d3a30b43de941e82088062c
2019-01-30 10:38:45 -08:00
Daniel Büchele
7ac6a09af1 build headless version
Summary:
* Adds `build-headless.js` to bundle the app using metro
* the build script replaces the prelude code added by metro with our own to make it work in node. Metro will add an API to add custom prelude code in the next version.
* Pins down metro's dependency of `temp` to `v0.9.0` (instead of `0.8.3`) to be compatible with node 10. (This will be fixed in a metro upgrade)

Reviewed By: passy

Differential Revision: D13786574

fbshipit-source-id: bddb3542c370c068d90a90c4b59337f995e4fa3f
2019-01-25 12:19:07 -08:00
Daniel Büchele
78cd40e890 split build process
Summary: Moving a couple of build function from `build-release` to `build-utils` so they can be shared between the desktop build process and the headless build process.

Reviewed By: passy

Differential Revision: D13786575

fbshipit-source-id: df0a0da6d9a643e3e1c65470e1e96254e8966dd9
2019-01-25 12:19:07 -08:00
Pascal Hartig
2fd9bac31c Automatically create snapshot release
Summary: This adds some frankly disgusting magic to the bump script to determine the next viable snapshot version and creates a second commit.

Reviewed By: jknoxville

Differential Revision: D13801765

fbshipit-source-id: 40728afe9dfde3da7a4fced645a89ed293109878
2019-01-25 03:27:32 -08:00
Pascal Hartig
685be44187 Small fixes to bump-version.sh
Summary: Indentation, abort jq installation on non-Darwin, spelling.

Reviewed By: jknoxville

Differential Revision: D13801766

fbshipit-source-id: 2e2e45806b43ff78d6c6d2e5a4ab166dd8d043b1
2019-01-24 11:27:43 -08:00
Pascal Hartig
383cabe212 Update bump binaries
Summary:
Compiled statically for darwin and Linux (x86_64). Also
changed some flags to make this reproducible.

Reviewed By: danielbuechele

Differential Revision: D13801305

fbshipit-source-id: d98701afca3c4787922d377bc6b674b59421f5b8
2019-01-24 04:43:15 -08:00
Pascal Hartig
7e911ed5e8 Move bump to project folder
Summary: Makes building a bit easier and I can have my own README in there.

Reviewed By: jknoxville

Differential Revision: D13784725

fbshipit-source-id: b694c1ce812d4e383ad44faeacd8e0094a96b432
2019-01-24 03:42:12 -08:00
Pascal Hartig
64d3f34fe5 Improve version bumping logic
Summary:
Currently, when bumping the version, the script will override "-SNAPSHOT" mentions in both the docs and the properties. This requires some manual fixup after every release. With this change, you can pass "-s" or "--snapshot" to change the version number to a snapshot release and it will only affect the places where that change is necessary.

Did some overall cleanup, too, like getting rid of the macro magic to determine the current location which messes with tooling.

This does *not* include the updated binaries yet. I'll put them up as a separate diff.

Reviewed By: priteshrnandgaonkar

Differential Revision: D13782177

fbshipit-source-id: 87ad0ab20a5f544ddb6aa3e2d30949bbabbabfc4
2019-01-23 08:03:32 -08:00
Pascal Hartig
82f4d4ad95 Add --no-updater flag
Summary: Provide a `--no-updater` option that disables the in-app auto updater when passed.

Reviewed By: jknoxville

Differential Revision: D13713919

fbshipit-source-id: 49a647105fea1efa23f653e4a6ed452b3489879b
2019-01-18 08:01:05 -08:00
Pascal Hartig
bdbd71b399 Fix bintray upload script (#353)
Summary:
I feel like I'm having a Groundhog Day moment. Haven't I fixed this
before?

Anyway, the release script fails (very verbosely) with an NPE
(https://circleci.com/gh/facebook/flipper/467?utm_campaign=workflow-failed&utm_medium=email&utm_source=notification)
when you run it on the root project. So we need to specify the
sub-projects we want to run it on.

groundhogday

Pull Request resolved: https://github.com/facebook/flipper/pull/353

Reviewed By: priteshrnandgaonkar

Differential Revision: D13652379

Pulled By: passy

fbshipit-source-id: dd9ff26444db7b30974a041870796b679e7fee0c
2019-01-15 07:19:33 -08:00
Pascal Hartig
7e847a62f5 Add bintray verification script
Summary:
Copied over form Litho, but works in our repo too.
This can be used to verify that a given version number
is properly accessible via maven. Just used this to check
if `v0.13.0` was available and sadly it wasn't because
Travis was broken. Working on that now.

Reviewed By: danielbuechele

Differential Revision: D13449948

fbshipit-source-id: 7f113d971dac341938615e6352b5981f557ffecd
2018-12-13 05:33:37 -08:00
John Knox
ad98ba3235 Never cache source files in dev mode
Summary:
Some times chrome caches the output from metro bundler, meaning when developing, it uses old source files and your changes have no effect.
This fixes that by adding dont-cache to the headers of all files served.

Reviewed By: danielbuechele

Differential Revision: D12922357

fbshipit-source-id: 2c3bdf8fb60e4ec64ace2c21f6b1e4656f885339
2018-11-05 10:48:34 -08:00
Pascal Hartig
ac6575850e Fail build when plugins don't compile
Summary:
This adds an option to the compilePlugin function that
allows specifying whether or not to throw an exception
if compiling a plugin fails.

While this seems like a sensible default while development,
it seems like a pretty bad idea when building releases.

Reviewed By: jknoxville

Differential Revision: D12904570

fbshipit-source-id: aee365074af129296a9d493804b959cb9513f9cc
2018-11-04 04:36:09 -08:00
Pascal Hartig
43e7acd07f Use jellyfish for release script
Summary: Arcanist is deprecated and slow. Let's not use it.

Reviewed By: jknoxville

Differential Revision: D12905244

fbshipit-source-id: c966df5e58ac8942bdb6b66f71e1eb7652477348
2018-11-02 11:16:08 -07:00
Daniel Büchele
e86a756e3c remove PortForwarder
Summary: Removing PortForwarderMacApp as it is not used anymore. Before it was used to allow us to debug physical iOS device. However, the support for physical iOS device was removed a while ago for security reasons. The PortForwarder was not in use anymore so it is safe to remove it.

Reviewed By: passy

Differential Revision: D10337888

fbshipit-source-id: 93f508ec524a0fc055141176c06d7e7169d83f16
2018-10-15 03:03:35 -07:00
Pascal Hartig
8da621f8e9 Exit with error code on yarn-install failure (#292)
Summary:
If installation fails, we should exit with an error code and not just a
message. This should help narrow down the CI failures, too.
Pull Request resolved: https://github.com/facebook/flipper/pull/292

Reviewed By: danielbuechele

Differential Revision: D10255759

Pulled By: passy

fbshipit-source-id: a6b033deadf11069e6c5665870a811ae2d0ec5ef
2018-10-09 08:41:10 -07:00
Charles Dick
44fea6b9bc update metro to 0.47.1 to fix sourcemaps in plugins
Summary: Inline sourcemaps were broken in Metro until 0.47.1, so now we can debug flipper plugins again!

Reviewed By: passy

Differential Revision: D10200221

fbshipit-source-id: 919c1bc4f7aee720f25f2375ffbd8a786ebd0017
2018-10-04 12:13:46 -07:00
Pascal Hartig
7c32e1163f Verbose snapshot building
Summary: Fails after 10 minutes of silence otherwise.

Reviewed By: danielbuechele

Differential Revision: D10123899

fbshipit-source-id: 5be9ae4cff7c72399d6d78d6248b710178953c22
2018-10-01 14:04:08 -07:00
Pascal Hartig
28f390c540 Increase verbosity (#282)
Summary:
Apparently, `--quiet` is *too* quiet on "dumb" terminals,
staying quiet for longer than 10 minutes on Circle CI, causing
the jobs to fail.
Pull Request resolved: https://github.com/facebook/flipper/pull/282

Reviewed By: jknoxville

Differential Revision: D10083183

Pulled By: passy

fbshipit-source-id: 6d006ab8aa2954d72d545bcef5d9e2d863a9f6a3
2018-09-27 05:52:02 -07:00
Pritesh Nandgaonkar
ddcc74edb8 Update release script to accomodate name change
Summary: As per the title

Reviewed By: danielbuechele

Differential Revision: D10050043

fbshipit-source-id: 7e3744fd9d2224456515cfa7187faebbf1541fa6
2018-09-26 06:59:09 -07:00