rnbuilder 0.5.26 → 0.5.27
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 +8 -7
- package/lib/commands/build.d.ts +1 -0
- package/lib/commands/build.js +18 -8
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g rnbuilder
|
|
|
20
20
|
$ rnbuilder COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ rnbuilder (-v|--version|version)
|
|
23
|
-
rnbuilder/0.5.
|
|
23
|
+
rnbuilder/0.5.27 darwin-arm64 node-v16.19.0
|
|
24
24
|
$ rnbuilder --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ rnbuilder COMMAND
|
|
@@ -49,6 +49,7 @@ OPTIONS
|
|
|
49
49
|
-b, --branch=branch Set the source branch used to build the app
|
|
50
50
|
-c, --client=client Set client that you want to build app
|
|
51
51
|
-e, --env=staging|adhoc|prod Set the environment: prod, adhoc, staging
|
|
52
|
+
-g, --ignore_git_reset Ignore git reset when building
|
|
52
53
|
-h, --help show CLI help
|
|
53
54
|
-i, --installr=installr If enabled, the build will be uploaded to installR
|
|
54
55
|
-t, --target=android|ios Set the build target: android, ios or both
|
|
@@ -59,7 +60,7 @@ EXAMPLE
|
|
|
59
60
|
hello world from ./src/build.ts!
|
|
60
61
|
```
|
|
61
62
|
|
|
62
|
-
_See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
63
|
+
_See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.27/src/commands/build.ts)_
|
|
63
64
|
|
|
64
65
|
## `rnbuilder codepush [BUILD]`
|
|
65
66
|
|
|
@@ -78,7 +79,7 @@ EXAMPLE
|
|
|
78
79
|
Push changes to existing apps ./src/firebase-sync-udids.ts!
|
|
79
80
|
```
|
|
80
81
|
|
|
81
|
-
_See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
82
|
+
_See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.27/src/commands/codepush.ts)_
|
|
82
83
|
|
|
83
84
|
## `rnbuilder help [COMMAND]`
|
|
84
85
|
|
|
@@ -110,7 +111,7 @@ EXAMPLE
|
|
|
110
111
|
initialize environment for first run from ./src/initialize.ts!
|
|
111
112
|
```
|
|
112
113
|
|
|
113
|
-
_See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
114
|
+
_See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.27/src/commands/initialize.ts)_
|
|
114
115
|
|
|
115
116
|
## `rnbuilder match-nuke [BUILD]`
|
|
116
117
|
|
|
@@ -129,7 +130,7 @@ EXAMPLE
|
|
|
129
130
|
Nuke certificates ./src/match-nuke.ts!
|
|
130
131
|
```
|
|
131
132
|
|
|
132
|
-
_See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
133
|
+
_See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.27/src/commands/match-nuke.ts)_
|
|
133
134
|
|
|
134
135
|
## `rnbuilder setup [SETUP]`
|
|
135
136
|
|
|
@@ -147,7 +148,7 @@ EXAMPLE
|
|
|
147
148
|
hello world from ./src/setup.ts!
|
|
148
149
|
```
|
|
149
150
|
|
|
150
|
-
_See code: [src/commands/setup.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
151
|
+
_See code: [src/commands/setup.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.27/src/commands/setup.ts)_
|
|
151
152
|
|
|
152
153
|
## `rnbuilder sync-udids [BUILD]`
|
|
153
154
|
|
|
@@ -166,5 +167,5 @@ EXAMPLE
|
|
|
166
167
|
Sync device UDIDs from firebase from ./src/firebase-sync-udids.ts!
|
|
167
168
|
```
|
|
168
169
|
|
|
169
|
-
_See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
170
|
+
_See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.27/src/commands/sync-udids.ts)_
|
|
170
171
|
<!-- commandsstop -->
|
package/lib/commands/build.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export default class Build extends Command {
|
|
|
10
10
|
branch: flags.IOptionFlag<string | undefined>;
|
|
11
11
|
version: flags.IOptionFlag<string | undefined>;
|
|
12
12
|
installr: flags.IOptionFlag<string | undefined>;
|
|
13
|
+
ignore_git_reset: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
|
|
13
14
|
};
|
|
14
15
|
static args: {
|
|
15
16
|
name: string;
|
package/lib/commands/build.js
CHANGED
|
@@ -197,14 +197,17 @@ class Build extends command_1.Command {
|
|
|
197
197
|
const { client, target } = params, otherParams = tslib_1.__rest(params, ["client", "target"]);
|
|
198
198
|
const jsonFile = this.getJsonFile(otherParams.env);
|
|
199
199
|
const parameters = common_1.buildKeyValuePairs(Object.assign(Object.assign({}, otherParams), { json_file: jsonFile }));
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
200
|
+
console.log({ ignore_git_reset: flags.ignore_git_reset });
|
|
201
|
+
if (!flags.ignore_git_reset) {
|
|
202
|
+
shell.exec(`git reset --hard && git checkout ${params.branch} && git pull`);
|
|
203
|
+
shell.cd('fastlane');
|
|
204
|
+
shell.exec('bundle update --bundler');
|
|
205
|
+
shell.exec('bundle install');
|
|
206
|
+
shell.exec('bundle update fastlane');
|
|
207
|
+
shell.exec('bundle update cocoapods');
|
|
208
|
+
shell.cd('../');
|
|
209
|
+
}
|
|
210
|
+
shell.exec('yarn install');
|
|
208
211
|
// Clean fastlane builds
|
|
209
212
|
shell.exec('rm -rf fastlane/builds');
|
|
210
213
|
// Clean android if any
|
|
@@ -213,6 +216,9 @@ class Build extends command_1.Command {
|
|
|
213
216
|
shell.exec('./gradlew clean');
|
|
214
217
|
shell.cd('../');
|
|
215
218
|
}
|
|
219
|
+
if (target.includes('ios')) {
|
|
220
|
+
shell.exec('npx pod-install');
|
|
221
|
+
}
|
|
216
222
|
if (client) {
|
|
217
223
|
client.forEach((c) => {
|
|
218
224
|
shell.cd(`fastlane/clients/${c}`);
|
|
@@ -263,5 +269,9 @@ Build.flags = {
|
|
|
263
269
|
char: 'i',
|
|
264
270
|
description: 'If enabled, the build will be uploaded to installR',
|
|
265
271
|
}),
|
|
272
|
+
ignore_git_reset: command_1.flags.boolean({
|
|
273
|
+
char: 'g',
|
|
274
|
+
description: 'Ignore git reset when building',
|
|
275
|
+
}),
|
|
266
276
|
};
|
|
267
277
|
Build.args = [{ name: 'build' }];
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.5.
|
|
1
|
+
{"version":"0.5.27","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"]},"env":{"name":"env","type":"option","char":"e","description":"Set the environment: prod, adhoc, staging","options":["staging","adhoc","prod"]},"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"},"ignore_git_reset":{"name":"ignore_git_reset","type":"boolean","char":"g","description":"Ignore git reset when building","allowNo":false}},"args":[{"name":"build"}]},"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"}]},"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-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"}]},"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"}]},"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"}]}}}
|