rnbuilder 0.6.62 → 0.6.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -15
- package/lib/commands/build.d.ts +1 -1
- package/lib/commands/build.js +3 -3
- package/lib/commands/match-check.js +38 -6
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
rnbuilder
|
|
2
|
-
=========
|
|
1
|
+
# rnbuilder
|
|
3
2
|
|
|
4
3
|
React Native builder tool
|
|
5
4
|
|
|
@@ -10,24 +9,29 @@ React Native builder tool
|
|
|
10
9
|
[](https://github.com/r0b0t3d/rnbuilder/blob/master/package.json)
|
|
11
10
|
|
|
12
11
|
<!-- toc -->
|
|
12
|
+
* [rnbuilder](#rnbuilder)
|
|
13
13
|
* [Usage](#usage)
|
|
14
14
|
* [Commands](#commands)
|
|
15
15
|
<!-- tocstop -->
|
|
16
|
+
|
|
16
17
|
# Usage
|
|
18
|
+
|
|
17
19
|
<!-- usage -->
|
|
18
20
|
```sh-session
|
|
19
21
|
$ npm install -g rnbuilder
|
|
20
22
|
$ rnbuilder COMMAND
|
|
21
23
|
running command...
|
|
22
24
|
$ rnbuilder (-v|--version|version)
|
|
23
|
-
rnbuilder/0.6.
|
|
25
|
+
rnbuilder/0.6.64 darwin-arm64 node-v24.13.0
|
|
24
26
|
$ rnbuilder --help [COMMAND]
|
|
25
27
|
USAGE
|
|
26
28
|
$ rnbuilder COMMAND
|
|
27
29
|
...
|
|
28
30
|
```
|
|
29
31
|
<!-- usagestop -->
|
|
32
|
+
|
|
30
33
|
# Commands
|
|
34
|
+
|
|
31
35
|
<!-- commands -->
|
|
32
36
|
* [`rnbuilder build [BUILD]`](#rnbuilder-build-build)
|
|
33
37
|
* [`rnbuilder check-version [MATCH-CHECK]`](#rnbuilder-check-version-match-check)
|
|
@@ -56,7 +60,7 @@ OPTIONS
|
|
|
56
60
|
-d, --distribute=distribute Specify where to distribute app
|
|
57
61
|
-e, --env=env Set the environment: prod, staging, dev
|
|
58
62
|
-f, --firebase If enabled, the build will be uploaded to firebase
|
|
59
|
-
-g, --
|
|
63
|
+
-g, --gitReset Do git reset when building
|
|
60
64
|
-h, --help show CLI help
|
|
61
65
|
-i, --installr=installr If enabled, the build will be uploaded to installR
|
|
62
66
|
-s, --cleanup Do cleanup when building
|
|
@@ -73,7 +77,7 @@ EXAMPLE
|
|
|
73
77
|
hello world from ./src/build.ts!
|
|
74
78
|
```
|
|
75
79
|
|
|
76
|
-
_See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
80
|
+
_See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.64/src/commands/build.ts)_
|
|
77
81
|
|
|
78
82
|
## `rnbuilder check-version [MATCH-CHECK]`
|
|
79
83
|
|
|
@@ -92,7 +96,7 @@ EXAMPLE
|
|
|
92
96
|
Nuke certificates ./src/match-check.ts!
|
|
93
97
|
```
|
|
94
98
|
|
|
95
|
-
_See code: [src/commands/check-version.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
99
|
+
_See code: [src/commands/check-version.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.64/src/commands/check-version.ts)_
|
|
96
100
|
|
|
97
101
|
## `rnbuilder codepush [BUILD]`
|
|
98
102
|
|
|
@@ -111,7 +115,7 @@ EXAMPLE
|
|
|
111
115
|
Push changes to existing apps ./src/firebase-sync-udids.ts!
|
|
112
116
|
```
|
|
113
117
|
|
|
114
|
-
_See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
118
|
+
_See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.64/src/commands/codepush.ts)_
|
|
115
119
|
|
|
116
120
|
## `rnbuilder google-key [MATCH-CHECK]`
|
|
117
121
|
|
|
@@ -130,7 +134,7 @@ EXAMPLE
|
|
|
130
134
|
Nuke certificates ./src/match-check.ts!
|
|
131
135
|
```
|
|
132
136
|
|
|
133
|
-
_See code: [src/commands/google-key.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
137
|
+
_See code: [src/commands/google-key.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.64/src/commands/google-key.ts)_
|
|
134
138
|
|
|
135
139
|
## `rnbuilder help [COMMAND]`
|
|
136
140
|
|
|
@@ -162,7 +166,7 @@ EXAMPLE
|
|
|
162
166
|
initialize environment for first run from ./src/initialize.ts!
|
|
163
167
|
```
|
|
164
168
|
|
|
165
|
-
_See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
169
|
+
_See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.64/src/commands/initialize.ts)_
|
|
166
170
|
|
|
167
171
|
## `rnbuilder match-check [MATCH-CHECK]`
|
|
168
172
|
|
|
@@ -181,7 +185,7 @@ EXAMPLE
|
|
|
181
185
|
Nuke certificates ./src/match-check.ts!
|
|
182
186
|
```
|
|
183
187
|
|
|
184
|
-
_See code: [src/commands/match-check.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
188
|
+
_See code: [src/commands/match-check.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.64/src/commands/match-check.ts)_
|
|
185
189
|
|
|
186
190
|
## `rnbuilder match-nuke [BUILD]`
|
|
187
191
|
|
|
@@ -200,7 +204,7 @@ EXAMPLE
|
|
|
200
204
|
Nuke certificates ./src/match-nuke.ts!
|
|
201
205
|
```
|
|
202
206
|
|
|
203
|
-
_See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
207
|
+
_See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.64/src/commands/match-nuke.ts)_
|
|
204
208
|
|
|
205
209
|
## `rnbuilder onesignal [BUILD]`
|
|
206
210
|
|
|
@@ -222,7 +226,7 @@ EXAMPLE
|
|
|
222
226
|
Create and upload push certificate to One Signal from ./src/commands/onesignal.ts!
|
|
223
227
|
```
|
|
224
228
|
|
|
225
|
-
_See code: [src/commands/onesignal.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
229
|
+
_See code: [src/commands/onesignal.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.64/src/commands/onesignal.ts)_
|
|
226
230
|
|
|
227
231
|
## `rnbuilder setup [SETUP]`
|
|
228
232
|
|
|
@@ -240,7 +244,7 @@ EXAMPLE
|
|
|
240
244
|
hello world from ./src/setup.ts!
|
|
241
245
|
```
|
|
242
246
|
|
|
243
|
-
_See code: [src/commands/setup.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
247
|
+
_See code: [src/commands/setup.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.64/src/commands/setup.ts)_
|
|
244
248
|
|
|
245
249
|
## `rnbuilder submit-review [SUBMIT-REVIEW]`
|
|
246
250
|
|
|
@@ -259,7 +263,7 @@ EXAMPLE
|
|
|
259
263
|
Push changes to existing apps ./src/firebase-sync-udids.ts!
|
|
260
264
|
```
|
|
261
265
|
|
|
262
|
-
_See code: [src/commands/submit-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
266
|
+
_See code: [src/commands/submit-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.64/src/commands/submit-review.ts)_
|
|
263
267
|
|
|
264
268
|
## `rnbuilder sync-udids [BUILD]`
|
|
265
269
|
|
|
@@ -278,5 +282,5 @@ EXAMPLE
|
|
|
278
282
|
Sync device UDIDs from firebase from ./src/firebase-sync-udids.ts!
|
|
279
283
|
```
|
|
280
284
|
|
|
281
|
-
_See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
285
|
+
_See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.64/src/commands/sync-udids.ts)_
|
|
282
286
|
<!-- commandsstop -->
|
package/lib/commands/build.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export default class Build extends Command {
|
|
|
14
14
|
firebase: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
15
15
|
testersIos: flags.IOptionFlag<string | undefined>;
|
|
16
16
|
testersAndroid: flags.IOptionFlag<string | undefined>;
|
|
17
|
-
|
|
17
|
+
gitReset: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
18
18
|
cleanup: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
19
19
|
groupsIos: flags.IOptionFlag<string | undefined>;
|
|
20
20
|
groupsAndroid: flags.IOptionFlag<string | undefined>;
|
package/lib/commands/build.js
CHANGED
|
@@ -239,7 +239,7 @@ class Build extends command_1.Command {
|
|
|
239
239
|
}
|
|
240
240
|
const jsonFile = common_1.getJsonFile(otherParams.env);
|
|
241
241
|
const parameters = common_1.buildKeyValuePairs(Object.assign(Object.assign({}, otherParams), { json_file: jsonFile }));
|
|
242
|
-
if (flags.
|
|
242
|
+
if (flags.gitReset) {
|
|
243
243
|
if (params.branch) {
|
|
244
244
|
shell.exec(`git reset --hard && git checkout ${params.branch}`);
|
|
245
245
|
}
|
|
@@ -323,9 +323,9 @@ Build.flags = {
|
|
|
323
323
|
char: 'u',
|
|
324
324
|
description: 'Tester ids for Android distribution',
|
|
325
325
|
}),
|
|
326
|
-
|
|
326
|
+
gitReset: command_1.flags.boolean({
|
|
327
327
|
char: 'g',
|
|
328
|
-
description: '
|
|
328
|
+
description: 'Do git reset when building',
|
|
329
329
|
}),
|
|
330
330
|
cleanup: command_1.flags.boolean({
|
|
331
331
|
char: 's',
|
|
@@ -4,17 +4,49 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
const command_1 = require("@oclif/command");
|
|
5
5
|
const shell = require("shelljs");
|
|
6
6
|
const common_1 = require("../utils/common");
|
|
7
|
+
const inquirer = require("inquirer");
|
|
7
8
|
class MatchNuke extends command_1.Command {
|
|
8
9
|
async run() {
|
|
9
10
|
const clients = common_1.getDirectories('./fastlane/clients');
|
|
10
11
|
if (clients.length > 0) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const questions = [];
|
|
13
|
+
questions.push({
|
|
14
|
+
type: 'checkbox-plus',
|
|
15
|
+
name: 'client',
|
|
16
|
+
message: 'What is the client?',
|
|
17
|
+
pageSize: 100,
|
|
18
|
+
highlight: true,
|
|
19
|
+
searchable: true,
|
|
20
|
+
default: [],
|
|
21
|
+
source: (answersSoFar, input) => {
|
|
22
|
+
input = input || '';
|
|
23
|
+
return new Promise(resolve => {
|
|
24
|
+
const result = clients.filter(client => client.toLowerCase().includes(input.toLowerCase()));
|
|
25
|
+
resolve(result);
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
validate: (input) => {
|
|
29
|
+
return new Promise(resolve => {
|
|
30
|
+
if (input.length === 0) {
|
|
31
|
+
resolve('You need to select at least 1 client');
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
resolve(true);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
},
|
|
17
38
|
});
|
|
39
|
+
const answers = await inquirer.prompt(questions);
|
|
40
|
+
if (answers.client.length > 0) {
|
|
41
|
+
answers.client.forEach((c) => {
|
|
42
|
+
const envPath = `./fastlane/clients/${c}/fastlane`;
|
|
43
|
+
shell.exec('pwd');
|
|
44
|
+
shell.cd(envPath);
|
|
45
|
+
shell.exec('bundle exec fastlane match_check');
|
|
46
|
+
shell.cd('../../../../');
|
|
47
|
+
shell.exec('pwd');
|
|
48
|
+
});
|
|
49
|
+
}
|
|
18
50
|
}
|
|
19
51
|
else {
|
|
20
52
|
shell.cd('fastlane');
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.6.
|
|
1
|
+
{"version":"0.6.64","commands":{"build":{"id":"build","description":"Build react native apps","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder build\nhello world from ./src/build.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"client":{"name":"client","type":"option","char":"c","description":"Set client that you want to build app"},"target":{"name":"target","type":"option","char":"t","description":"Set the build target: android, ios or both","options":["android","ios","android,ios"]},"env":{"name":"env","type":"option","char":"e","description":"Set the environment: prod, staging, dev"},"branch":{"name":"branch","type":"option","char":"b","description":"Set the source branch used to build the app"},"version":{"name":"version","type":"option","char":"v","description":"Set the version number for this build"},"installr":{"name":"installr","type":"option","char":"i","description":"If enabled, the build will be uploaded to installR"},"distribute":{"name":"distribute","type":"option","char":"d","description":"Specify where to distribute app"},"firebase":{"name":"firebase","type":"boolean","char":"f","description":"If enabled, the build will be uploaded to firebase","allowNo":false},"testersIos":{"name":"testersIos","type":"option","char":"t","description":"Tester ids for iOS distribution"},"testersAndroid":{"name":"testersAndroid","type":"option","char":"u","description":"Tester ids for Android distribution"},"gitReset":{"name":"gitReset","type":"boolean","char":"g","description":"Do git reset when building","allowNo":false},"cleanup":{"name":"cleanup","type":"boolean","char":"s","description":"Do cleanup when building","allowNo":false},"groupsIos":{"name":"groupsIos","type":"option","description":"Groups ids for iOS distribution"},"groupsAndroid":{"name":"groupsAndroid","type":"option","description":"Groups ids for Android distribution"},"skipCheckVersion":{"name":"skipCheckVersion","type":"boolean","description":"Skip checking current version on stores","allowNo":false}},"args":[{"name":"build"}]},"check-version":{"id":"check-version","description":"Check live versions","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder check-version\n Nuke certificates ./src/match-check.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"client":{"name":"client","type":"option","char":"c","description":"Select client that you want to sync udids"}},"args":[{"name":"match-check"}]},"codepush":{"id":"codepush","description":"Push changes to existing apps","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder codepush\n Push changes to existing apps ./src/firebase-sync-udids.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"client":{"name":"client","type":"option","char":"c","description":"Select client that you want to push update"}},"args":[{"name":"build"}]},"google-key":{"id":"google-key","description":"Nuke certificates","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder match-check\n Nuke certificates ./src/match-check.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"client":{"name":"client","type":"option","char":"c","description":"Select client that you want to sync udids"}},"args":[{"name":"match-check"}]},"initialize":{"id":"initialize","description":"Initialize the environment for first run","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder initialize\ninitialize environment for first run from ./src/initialize.ts!\n"],"flags":{},"args":[]},"match-check":{"id":"match-check","description":"Nuke certificates","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder match-check\n Nuke certificates ./src/match-check.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"client":{"name":"client","type":"option","char":"c","description":"Select client that you want to sync udids"}},"args":[{"name":"match-check"}]},"match-nuke":{"id":"match-nuke","description":"Nuke certificates","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder match-nuke\n Nuke certificates ./src/match-nuke.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"client":{"name":"client","type":"option","char":"c","description":"Select client that you want to sync udids"}},"args":[{"name":"build"}]},"onesignal":{"id":"onesignal","description":"Create and upload push cerfiticate to One Signal","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder onesignal\n Create and upload push certificate to One Signal from ./src/commands/onesignal.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"client":{"name":"client","type":"option","char":"c","description":"Select client that you want to sync udids"},"auth_token":{"name":"auth_token","type":"option","description":"Auth token for OneSignal"},"android_token":{"name":"android_token","type":"option"},"android_gcm_sender_id":{"name":"android_gcm_sender_id","type":"option"}},"args":[{"name":"build"}]},"setup":{"id":"setup","description":"Setup new client","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder build\nhello world from ./src/setup.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[{"name":"setup"}]},"submit-review":{"id":"submit-review","description":"Submit ios for review","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder submit-review\n Push changes to existing apps ./src/firebase-sync-udids.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"client":{"name":"client","type":"option","char":"c","description":"Select client that you want to push update"}},"args":[{"name":"submit-review"}]},"sync-udids":{"id":"sync-udids","description":"Sync device UDIDs from firebase","pluginName":"rnbuilder","pluginType":"core","aliases":[],"examples":["$ rnbuilder sync-udids\n Sync device UDIDs from firebase from ./src/firebase-sync-udids.ts!\n"],"flags":{"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false},"client":{"name":"client","type":"option","char":"c","description":"Select client that you want to sync udids"}},"args":[{"name":"build"}]}}}
|