rnbuilder 0.5.9 → 0.5.11
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 +6 -6
- package/lib/commands/build.js +21 -13
- 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.11 darwin-arm64 node-v18.4.0
|
|
24
24
|
$ rnbuilder --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ rnbuilder COMMAND
|
|
@@ -58,7 +58,7 @@ EXAMPLE
|
|
|
58
58
|
hello world from ./src/build.ts!
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
_See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
61
|
+
_See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.11/src/commands/build.ts)_
|
|
62
62
|
|
|
63
63
|
## `rnbuilder codepush [BUILD]`
|
|
64
64
|
|
|
@@ -77,7 +77,7 @@ EXAMPLE
|
|
|
77
77
|
Push changes to existing apps ./src/firebase-sync-udids.ts!
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
_See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
80
|
+
_See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.11/src/commands/codepush.ts)_
|
|
81
81
|
|
|
82
82
|
## `rnbuilder help [COMMAND]`
|
|
83
83
|
|
|
@@ -109,7 +109,7 @@ EXAMPLE
|
|
|
109
109
|
initialize environment for first run from ./src/initialize.ts!
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
_See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
112
|
+
_See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.11/src/commands/initialize.ts)_
|
|
113
113
|
|
|
114
114
|
## `rnbuilder match-nuke [BUILD]`
|
|
115
115
|
|
|
@@ -128,7 +128,7 @@ EXAMPLE
|
|
|
128
128
|
Nuke certificates ./src/match-nuke.ts!
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
_See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
131
|
+
_See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.11/src/commands/match-nuke.ts)_
|
|
132
132
|
|
|
133
133
|
## `rnbuilder sync-udids [BUILD]`
|
|
134
134
|
|
|
@@ -147,5 +147,5 @@ EXAMPLE
|
|
|
147
147
|
Sync device UDIDs from firebase from ./src/firebase-sync-udids.ts!
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
_See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.
|
|
150
|
+
_See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.5.11/src/commands/sync-udids.ts)_
|
|
151
151
|
<!-- commandsstop -->
|
package/lib/commands/build.js
CHANGED
|
@@ -12,7 +12,7 @@ class Build extends command_1.Command {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
14
14
|
this.askForMissingFields = async (flags) => {
|
|
15
|
-
|
|
15
|
+
let questions = [];
|
|
16
16
|
if (!flags.client) {
|
|
17
17
|
const clients = utils_1.getDirectories('./fastlane/clients');
|
|
18
18
|
if (clients.length > 0) {
|
|
@@ -62,11 +62,23 @@ class Build extends command_1.Command {
|
|
|
62
62
|
const answers = await inquirer.prompt(questions);
|
|
63
63
|
result = Object.assign(Object.assign({}, flags), answers);
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
questions = [];
|
|
66
|
+
if (result.env === 'prod') {
|
|
67
|
+
questions.push({
|
|
68
|
+
type: 'list',
|
|
69
|
+
name: 'distribute',
|
|
70
|
+
message: 'What would you like to distribute to?',
|
|
71
|
+
default: 'store',
|
|
72
|
+
choices: ['store', 'firebase'],
|
|
73
|
+
filter(val) {
|
|
74
|
+
return val.toLowerCase();
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
const answers = await inquirer.prompt(questions);
|
|
78
|
+
result = Object.assign(Object.assign({}, result), answers);
|
|
67
79
|
}
|
|
68
80
|
const postQuestions = [];
|
|
69
|
-
if (result.env !== 'prod') {
|
|
81
|
+
if (result.env !== 'prod' || result.distribute === 'firebase') {
|
|
70
82
|
postQuestions.push({
|
|
71
83
|
type: 'confirm',
|
|
72
84
|
name: 'firebase',
|
|
@@ -168,15 +180,7 @@ class Build extends command_1.Command {
|
|
|
168
180
|
const params = await this.askForMissingFields(flags);
|
|
169
181
|
const { client, target } = params, otherParams = tslib_1.__rest(params, ["client", "target"]);
|
|
170
182
|
const parameters = utils_1.buildKeyValuePairs(otherParams);
|
|
171
|
-
|
|
172
|
-
client.forEach((c) => {
|
|
173
|
-
this.updateAppVersion(target, otherParams.env, c, otherParams.version_number);
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
this.updateAppVersion(target, otherParams.env, undefined, otherParams.version_number);
|
|
178
|
-
}
|
|
179
|
-
shell.exec('git add . && git commit -m "bump version" && git push');
|
|
183
|
+
shell.exec(`git checkout ${params.branch}`);
|
|
180
184
|
shell.cd('fastlane');
|
|
181
185
|
shell.exec('bundle update --bundler');
|
|
182
186
|
shell.exec('bundle install');
|
|
@@ -184,12 +188,16 @@ class Build extends command_1.Command {
|
|
|
184
188
|
shell.exec('bundle update cocoapods');
|
|
185
189
|
if (client) {
|
|
186
190
|
client.forEach((c) => {
|
|
191
|
+
this.updateAppVersion(target, otherParams.env, c, otherParams.version_number);
|
|
192
|
+
shell.exec(`git add . && git commit -m "bump version ${process.env.CLIENT} - ${params.env}"`);
|
|
193
|
+
shell.exec('git pull && git push');
|
|
187
194
|
shell.cd(`clients/${c}`);
|
|
188
195
|
this.runPlatforms(target, parameters, otherParams);
|
|
189
196
|
shell.cd('../..');
|
|
190
197
|
});
|
|
191
198
|
}
|
|
192
199
|
else {
|
|
200
|
+
this.updateAppVersion(target, otherParams.env, undefined, otherParams.version_number);
|
|
193
201
|
this.runPlatforms(target, parameters, otherParams);
|
|
194
202
|
}
|
|
195
203
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.5.
|
|
1
|
+
{"version":"0.5.11","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"}},"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"}]},"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"}]}}}
|