Commit Graph

155 Commits

Author SHA1 Message Date
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
Daniel Büchele
36d00bce4c add source map support
Summary: Use inline source maps for plugins and main bundle, both in production and development.

Reviewed By: passy

Differential Revision: D9967235

fbshipit-source-id: 245e65c6fea94b93dc34a65ae572b7fc98ad56e1
2018-09-25 04:02:28 -07:00
Daniel Büchele
2b4193a013 metro upgrade
Summary: Upgrading to metro@0.45.3 and adapting to API changes made by metro.

Reviewed By: passy

Differential Revision: D9940734

fbshipit-source-id: 34b07cc70c9654d9e07755816aba703a826dcae9
2018-09-20 04:27:48 -07:00
Pascal Hartig
5aa14626f8 Make build scripts less verbose (#274)
Summary:
`--info` was only useful while debugging the initial setup. This also
makes skipping non-snapshot builds no longer fatal.
Pull Request resolved: https://github.com/facebook/flipper/pull/274

Reviewed By: jknoxville

Differential Revision: D9934199

Pulled By: passy

fbshipit-source-id: 051cdacc63a2480f7670d714aaf8ef7d0df11df7
2018-09-19 05:12:09 -07:00
Pascal Hartig
474a36c0e2 Set up automatic release publishing (#266)
Summary:
On tags, build and publish artifacts to bintray. The encrypted accounted creds are for a `flipperfbbot` account on Bintray I created for this.
Pull Request resolved: https://github.com/facebook/flipper/pull/266

Reviewed By: priteshrnandgaonkar

Differential Revision: D9848181

Pulled By: passy

fbshipit-source-id: cf9150b2352a9ce972c48533ce15e8e75aa908fe
2018-09-17 01:57:48 -07:00
Pritesh Nandgaonkar
41d5efeeec chmod script
Summary: Fixes chmod and mac os script error and also tests if jq is installed

Reviewed By: passy

Differential Revision: D9789391

fbshipit-source-id: 11319539d4f511294f216860497bf0e67ee1af08
2018-09-12 09:13:35 -07:00
Pritesh Nandgaonkar
39c933afc5 Consolidated bump script
Summary: Updated script to update version numbers for android and package.json

Reviewed By: passy

Differential Revision: D9700848

fbshipit-source-id: 00fd63ff1ed215cc92e7808c70107de45249aa83
2018-09-09 14:13:20 -07:00
Pascal Hartig
cf3cb0d08f Use CircleCI for SNAPSHOT deployment (#260)
Summary:
Per title. It actually works!
Pull Request resolved: https://github.com/facebook/flipper/pull/260

Reviewed By: jknoxville

Differential Revision: D9633320

Pulled By: passy

fbshipit-source-id: 10ee856977fa0a337972a472d41eb7a83075c39b
2018-09-04 04:28:20 -07:00
Pascal Hartig
dc05fde28d Add version bumping script for Android
Summary:
Adding binaries and source as build times can be a bit long.

```
$ ./bump.sh
Flipper Version Bumper

Usage: bump.lnx64 VERSION

Available options:
  -h,--help                Show this help text
  VERSION                  Version to bump to, e.g. 1.0.2
```

```
$ ./bump.sh 1.0.2
Starting bump to Version "1.0.2".
Updating version in FilePath "/home/realpassy/local/fbsource/xplat/sonar/gradle.properties"
Updating version in FilePath "/home/realpassy/local/fbsource/xplat/sonar/docs/getting-started.md"
Done!
```

```
$ hg diff
 diff --git a/xplat/sonar/docs/getting-started.md b/xplat/sonar/docs/getting-started.md
 --- a/xplat/sonar/docs/getting-started.md
+++ b/xplat/sonar/docs/getting-started.md
@@ -44,7 +44,7 @@
 }

 dependencies {
-  debugImplementation 'com.facebook.flipper:flipper:0.6.18'
+  debugImplementation 'com.facebook.flipper:flipper:1.0.2'
 }

 diff --git a/xplat/sonar/gradle.properties b/xplat/sonar/gradle.properties
 --- a/xplat/sonar/gradle.properties
+++ b/xplat/sonar/gradle.properties
@@ -1,5 +1,5 @@
 # POM publishing constants
-VERSION_NAME=0.6.19-SNAPSHOT
+VERSION_NAME=1.0.2
 GROUP=com.facebook.flipper
 POM_URL=https://github.com/facebook/flipper
 POM_SCM_URL=https://github.com/facebook/flipper.git

```

Reviewed By: danielbuechele

Differential Revision: D9629787

fbshipit-source-id: b11870236809daa393dcef7eaf98ba9018ad7154
2018-09-03 07:57:15 -07:00
Pascal Hartig
5a970fde0d Encrypt secrets with openssl-1.0.1f
Summary:
Not encrypted with any OpenSSL version or LibreSSL, but with OpenSSL version one dot oh dot one eff.
Backwards-compatibility is hard.

Reviewed By: danielbuechele

Differential Revision: D9578686

fbshipit-source-id: 21c70b071d74cd37e6eb489cfff731efa314bbe6
2018-08-30 15:13:24 -07:00
Pascal Hartig
456e026257 Encrypt Travis secrets with LibreSSL
Summary:
Looks like Travis is running on an ancient version of OpenSSL which is incompatible with OpenSSL 1.1, which I used to encrypt the secrets.

See output here: https://travis-ci.org/facebook/flipper/jobs/422172610

Reviewed By: jknoxville, danielbuechele

Differential Revision: D9570729

fbshipit-source-id: 01ad282bbb614bb5d51e09f1b2e4f8d5eeabe2a9
2018-08-30 05:42:29 -07:00
Pascal Hartig
db8fa7902c Fix publish-android-snapshot issues
Summary:
As expected, this didn't work on the first try. Issues I've fixed:

- Actually switch back to snapshots.
- Use more widely compatible bash location.
- Don't exit (because of `set -e`) if `grep` returns with status 1.

Reviewed By: jknoxville

Differential Revision: D9556770

fbshipit-source-id: 0900e6498e7fc8e16c941e77927005573ca310d5
2018-08-29 10:13:03 -07:00
Pascal Hartig
91b6cf1c6a Set up automatic android snapshot publishing
Summary:
Set up automatic publishing to Maven Snapshots if the current
VERSION_NAME ends in `-SNAPSHOT`.

Reviewed By: danielbuechele

Differential Revision: D9539838

fbshipit-source-id: 6e413fa3b02966946bb867eebe7ba8b863f291b9
2018-08-29 07:12:47 -07:00
Pritesh Nandgaonkar
52fe553e21 Change iOS version update script
Summary: This diff updates the iOS version update script to incorporate the change in folder from fbobjc to xplat.

Reviewed By: danielbuechele

Differential Revision: D9542137

fbshipit-source-id: 4cb48d1b14d3c94d000490c7a21260766d493fc7
2018-08-29 06:13:13 -07:00
Hilal Alsibai
5285d50abf Add syntax highlighting
Summary: Pretty colors

Reviewed By: danielbuechele

Differential Revision: D9504416

fbshipit-source-id: 7eb467ff43bed5566f3bd9ce72dc74064fb4718c
2018-08-29 03:27:07 -07:00
John Knox
a725a8fa68 Move sandcastle-build.sh to facebook folder
Summary: Now we won't need the shipit config to exclude it anymore

Reviewed By: passy

Differential Revision: D9049518

fbshipit-source-id: 983bc28fc3dce7543c9100992f2daff1dd783ea3
2018-08-08 07:27:27 -07:00
Daniel Büchele
134a0d96c5 renaming app to Flipper
Summary: rename all visible references of Sonar to Flipper. Changes endpoint URLs to the new repo address.

Reviewed By: passy

Differential Revision: D9082100

fbshipit-source-id: 2ab8b680a19c23d80050e8e768379c29d66acfca
2018-08-06 10:44:33 -07:00
Daniel Büchele
e3ac7f4e36 fix yarn deadlock in postinstall
Summary:
The script installing the plugin dependencies is executed by yarn itself. This means a yarn instance is running while the script is trying to create another yarn instance to install plugin dependencies. The second yarn instance is waiting for the first to finish, while the second can't start as long as the first hasn't finished. Deadlock.

This is why we use a port dirrerent from yarn's default port (31997) for the mutex.

Reviewed By: jknoxville

Differential Revision: D9149973

fbshipit-source-id: 69790021460fd8ddea9ed84ca8130c77be0a62a9
2018-08-03 08:41:48 -07:00
Daniel Büchele
696c73ebc1 fixing travis builds
Summary:
- making website deployment and desktop app builds two different travis jobs, so if one fails, the other is still working
- running website builds on linux, because, we don't need macOS for this
- making dependency installs serial instead of parallel to avoid problems of multiple yarn instances running at the same time
- removing duplicate postinstall script which breaks for electron 3 builds

Reviewed By: passy

Differential Revision: D9148342

fbshipit-source-id: 22f3a0fe59aff066c04fb964621604efc46aab8a
2018-08-03 05:56:38 -07:00
Daniel Büchele
1b072c71a7 use yarn network mutex
Summary: The file system mutex caused some problems in Sandcastle. This diffs switches for the default setting (network mutex) in the hope this fixes the problem

Reviewed By: passy

Differential Revision: D9132069

fbshipit-source-id: 5abb4d33b6db2a5d2b3f0788116ca6941e554591
2018-08-02 05:43:33 -07:00
Pritesh Nandgaonkar
41d0b2eec2 Move iOS scripts to xplat
Summary: Move iOS scripts to xplat

Reviewed By: passy

Differential Revision: D8989985

fbshipit-source-id: 1499657f6d9b7e82f26aa8c008951c885756b51d
2018-07-26 05:21:43 -07:00
Daniel Büchele
2fa9cfe4e7 Fix patch version number in public build script
Summary: Accidentally the version number passed to the build script was not only the patch number but the full semver-number. The build script is expecting a single number and there for ignored the version number that was passed. This caused the build to always have patch version 0.

Reviewed By: priteshrnandgaonkar

Differential Revision: D8804473

fbshipit-source-id: a116cac69066141fe8c8ed62020d16a1a7c40079
2018-07-11 08:42:02 -07:00
Aaron Brady
a223edafaa Get Sonar Running on Windows
Summary: Small tweaks so that Sonar can be started easily on windows.

Reviewed By: danielbuechele

Differential Revision: D8769592

fbshipit-source-id: 084dd50e5600a7e2e9c5544e3e79a18614933fdc
2018-07-11 08:18:25 -07:00
Daniel Büchele
9f95698492 disable auto publish
Summary: electro-builder automatically publishes when it detects builds on TravisCI. This disables this behaviour, as we want to manually publish releases.

Reviewed By: jknoxville

Differential Revision: D8783066

fbshipit-source-id: d8723c87b879b3ef7ee02585997a13cb55095e65
2018-07-11 08:03:57 -07:00
Daniel Büchele
c50b2864ce fix lint errors
Summary: builds were breakign due to linting erros

Reviewed By: jknoxville

Differential Revision: D8781557

fbshipit-source-id: fccd349d0088a7b7ab8359dfd4edee20230c2393
2018-07-10 08:11:44 -07:00
Hilal Alsibai
2a46f93eab Fix install for Windows (#138)
Summary:
This lets `yarn` work properly on Windows. Tested in a Cygwin environment. I also added a note about yarn compatibility to the readme.
Closes https://github.com/facebook/Sonar/pull/138

Reviewed By: danielbuechele

Differential Revision: D8734197

Pulled By: xiphirx

fbshipit-source-id: 19be8bb0653a2b0381224b065df0cac579d72c3b
2018-07-05 03:32:30 -07:00