Commit Graph

8 Commits

Author SHA1 Message Date
Anton Nikolaev
d57c4d687c Fix build-plugin script
Summary: This diff fixes "build-plugin" script which is failing for fb-internal plugins, because "fb/package.json" not exist. Because of that release of "fb/mobilebuilds" plugin failed recently: https://www.internalfb.com/intern/sandcastle/job/13510799309874638.

Reviewed By: passy

Differential Revision: D28624924

fbshipit-source-id: e00da98cfef992f5d49045afc9d404764a0d13ac
2021-05-24 02:46:42 -07:00
Anton Nikolaev
5ae104cc59 Merge plugin package.json from public and fb-internal parts
Summary: Allow splitting package.json to public one and fb-internal one located in "fb/package.json". When plugin is packaged, fields in package.json are overwritten by fields from "fb/package.json" if they exist. This give us a way to specify additional metadata which only make sense internally (e.g. oncall and internal links to docs and support).

Reviewed By: mweststrate

Differential Revision: D28542101

fbshipit-source-id: c0167461897a994e5731aaf0fe625de052eda864
2021-05-21 07:15:28 -07:00
Anton Nikolaev
b5d8f6c63d Output unpacked plugin dir in addition to tar from "build-plugin" command
Summary: "plugin-build" command will produce dir with unpacked plugin sources in addition to tar package. This is required because for publishing to Marketplace we need to retrieve few files from the output package, like "readme.md" and "package.json" and it's better to have it already unpacked rather than pack and then unpack to get these files.

Reviewed By: passy

Differential Revision: D28409930

fbshipit-source-id: 51c8eeb848a72850a2f126eb91a563d52851ed41
2021-05-13 05:32:07 -07:00
Anton Nikolaev
ef091e7a07 Allow specifying min required Flipper version on "build-plugin" command call
Summary: Added an arg for "build-plugin" command to easily set min required flipper version when plugin is packaged. Before that we only saved engine version in Marketplace metadata, but it's better to save it into the package as well, so we can check compatibility for installed packages even when we have no Marketplace metadata for them.

Reviewed By: passy

Differential Revision: D28350276

fbshipit-source-id: 916d891540263a1f99c1f6d2033eb13e1c36d78f
2021-05-12 07:49:13 -07:00
Anton Nikolaev
baeb8ba5be Performance improvements for "build-plugin" task
Summary:
Few improvements for "build-plugin" task which together with Sandcastle command changes (D26872427) helps to build all plugins in CI ~30% faster if most of them has not changed (which is usually the case):
1) compute package checksum in the same script to not call additional yarn scripts for each plugin
2) avoid packaging plugin if it's checksum has not changed since last release

Reviewed By: mweststrate

Differential Revision: D26872253

fbshipit-source-id: 968102d32a1550ea7503f1169f0ef2863296383f
2021-03-10 08:09:02 -08:00
Anton Nikolaev
a8a16e24b3 Set exit code to 1 if script failed
Summary: Fixed scripts to return exit code 1 in case of error.

Reviewed By: passy

Differential Revision: D22357664

fbshipit-source-id: 1e067fe507e8f33cf21e70f3d15fd97175b9544e
2020-07-02 10:20:36 -07:00
Anton Nikolaev
228d09d572 Script for resolving plugin directory by its package name
Summary:
Changed "build-plugin" script to allow triggering release by plugin name (required to enable triggering releases by button in Marketplace):
1) Added new script to resolve plugin dir by name
2) Allow passing either plugin dir or name to "build-plugin" script

Reviewed By: passy

Differential Revision: D22354643

fbshipit-source-id: b7aca57acefc81ca0b6d9c7f359f63d8f0599e39
2020-07-02 02:48:19 -07:00
Anton Nikolaev
666032fa46 "yarn build-plugin" command added
Summary: Added "build-plugin" command. Can be used like this: `yarn build-plugin fresco` which produces package to 'sonar/dist/plugins/fresco.tgz'

Reviewed By: mweststrate

Differential Revision: D22160253

fbshipit-source-id: 48b202984b0f515bf253b595be1f59953a9ce411
2020-06-22 08:15:56 -07:00