rnbuilder 0.6.17 → 0.6.18
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 +31 -11
- package/lib/commands/build.d.ts +0 -1
- package/lib/commands/build.js +1 -9
- package/lib/commands/check-version.d.ts +13 -0
- package/lib/commands/check-version.js +37 -0
- package/lib/utils/common.d.ts +1 -0
- package/lib/utils/common.js +9 -1
- 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.6.
|
|
23
|
+
rnbuilder/0.6.18 darwin-arm64 node-v18.18.0
|
|
24
24
|
$ rnbuilder --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ rnbuilder COMMAND
|
|
@@ -30,6 +30,7 @@ USAGE
|
|
|
30
30
|
# Commands
|
|
31
31
|
<!-- commands -->
|
|
32
32
|
* [`rnbuilder build [BUILD]`](#rnbuilder-build-build)
|
|
33
|
+
* [`rnbuilder check-version [MATCH-CHECK]`](#rnbuilder-check-version-match-check)
|
|
33
34
|
* [`rnbuilder codepush [BUILD]`](#rnbuilder-codepush-build)
|
|
34
35
|
* [`rnbuilder google-key [MATCH-CHECK]`](#rnbuilder-google-key-match-check)
|
|
35
36
|
* [`rnbuilder help [COMMAND]`](#rnbuilder-help-command)
|
|
@@ -65,7 +66,26 @@ EXAMPLE
|
|
|
65
66
|
hello world from ./src/build.ts!
|
|
66
67
|
```
|
|
67
68
|
|
|
68
|
-
_See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
69
|
+
_See code: [src/commands/build.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.18/src/commands/build.ts)_
|
|
70
|
+
|
|
71
|
+
## `rnbuilder check-version [MATCH-CHECK]`
|
|
72
|
+
|
|
73
|
+
Check live versions
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
USAGE
|
|
77
|
+
$ rnbuilder check-version [MATCH-CHECK]
|
|
78
|
+
|
|
79
|
+
OPTIONS
|
|
80
|
+
-c, --client=client Select client that you want to sync udids
|
|
81
|
+
-h, --help show CLI help
|
|
82
|
+
|
|
83
|
+
EXAMPLE
|
|
84
|
+
$ rnbuilder check-version
|
|
85
|
+
Nuke certificates ./src/match-check.ts!
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
_See code: [src/commands/check-version.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.18/src/commands/check-version.ts)_
|
|
69
89
|
|
|
70
90
|
## `rnbuilder codepush [BUILD]`
|
|
71
91
|
|
|
@@ -84,7 +104,7 @@ EXAMPLE
|
|
|
84
104
|
Push changes to existing apps ./src/firebase-sync-udids.ts!
|
|
85
105
|
```
|
|
86
106
|
|
|
87
|
-
_See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
107
|
+
_See code: [src/commands/codepush.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.18/src/commands/codepush.ts)_
|
|
88
108
|
|
|
89
109
|
## `rnbuilder google-key [MATCH-CHECK]`
|
|
90
110
|
|
|
@@ -103,7 +123,7 @@ EXAMPLE
|
|
|
103
123
|
Nuke certificates ./src/match-check.ts!
|
|
104
124
|
```
|
|
105
125
|
|
|
106
|
-
_See code: [src/commands/google-key.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
126
|
+
_See code: [src/commands/google-key.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.18/src/commands/google-key.ts)_
|
|
107
127
|
|
|
108
128
|
## `rnbuilder help [COMMAND]`
|
|
109
129
|
|
|
@@ -135,7 +155,7 @@ EXAMPLE
|
|
|
135
155
|
initialize environment for first run from ./src/initialize.ts!
|
|
136
156
|
```
|
|
137
157
|
|
|
138
|
-
_See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
158
|
+
_See code: [src/commands/initialize.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.18/src/commands/initialize.ts)_
|
|
139
159
|
|
|
140
160
|
## `rnbuilder match-check [MATCH-CHECK]`
|
|
141
161
|
|
|
@@ -154,7 +174,7 @@ EXAMPLE
|
|
|
154
174
|
Nuke certificates ./src/match-check.ts!
|
|
155
175
|
```
|
|
156
176
|
|
|
157
|
-
_See code: [src/commands/match-check.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
177
|
+
_See code: [src/commands/match-check.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.18/src/commands/match-check.ts)_
|
|
158
178
|
|
|
159
179
|
## `rnbuilder match-nuke [BUILD]`
|
|
160
180
|
|
|
@@ -173,7 +193,7 @@ EXAMPLE
|
|
|
173
193
|
Nuke certificates ./src/match-nuke.ts!
|
|
174
194
|
```
|
|
175
195
|
|
|
176
|
-
_See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
196
|
+
_See code: [src/commands/match-nuke.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.18/src/commands/match-nuke.ts)_
|
|
177
197
|
|
|
178
198
|
## `rnbuilder onesignal [BUILD]`
|
|
179
199
|
|
|
@@ -195,7 +215,7 @@ EXAMPLE
|
|
|
195
215
|
Create and upload push certificate to One Signal from ./src/commands/onesignal.ts!
|
|
196
216
|
```
|
|
197
217
|
|
|
198
|
-
_See code: [src/commands/onesignal.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
218
|
+
_See code: [src/commands/onesignal.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.18/src/commands/onesignal.ts)_
|
|
199
219
|
|
|
200
220
|
## `rnbuilder setup [SETUP]`
|
|
201
221
|
|
|
@@ -213,7 +233,7 @@ EXAMPLE
|
|
|
213
233
|
hello world from ./src/setup.ts!
|
|
214
234
|
```
|
|
215
235
|
|
|
216
|
-
_See code: [src/commands/setup.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
236
|
+
_See code: [src/commands/setup.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.18/src/commands/setup.ts)_
|
|
217
237
|
|
|
218
238
|
## `rnbuilder submit-review [SUBMIT-REVIEW]`
|
|
219
239
|
|
|
@@ -232,7 +252,7 @@ EXAMPLE
|
|
|
232
252
|
Push changes to existing apps ./src/firebase-sync-udids.ts!
|
|
233
253
|
```
|
|
234
254
|
|
|
235
|
-
_See code: [src/commands/submit-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
255
|
+
_See code: [src/commands/submit-review.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.18/src/commands/submit-review.ts)_
|
|
236
256
|
|
|
237
257
|
## `rnbuilder sync-udids [BUILD]`
|
|
238
258
|
|
|
@@ -251,5 +271,5 @@ EXAMPLE
|
|
|
251
271
|
Sync device UDIDs from firebase from ./src/firebase-sync-udids.ts!
|
|
252
272
|
```
|
|
253
273
|
|
|
254
|
-
_See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.
|
|
274
|
+
_See code: [src/commands/sync-udids.ts](https://github.com/r0b0t3d/rnbuilder/blob/v0.6.18/src/commands/sync-udids.ts)_
|
|
255
275
|
<!-- commandsstop -->
|
package/lib/commands/build.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export default class Build extends Command {
|
|
|
17
17
|
name: string;
|
|
18
18
|
}[];
|
|
19
19
|
askForMissingFields: (flags: any) => Promise<any>;
|
|
20
|
-
getJsonFile(env: string): string;
|
|
21
20
|
runPlatforms(target: string[], parameters: any, otherParams: any): void;
|
|
22
21
|
run(): Promise<void>;
|
|
23
22
|
}
|
package/lib/commands/build.js
CHANGED
|
@@ -209,14 +209,6 @@ class Build extends command_1.Command {
|
|
|
209
209
|
return result;
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
-
getJsonFile(env) {
|
|
213
|
-
let fileName = 'app';
|
|
214
|
-
if (env !== 'prod') {
|
|
215
|
-
fileName = `${fileName}.${env}`;
|
|
216
|
-
}
|
|
217
|
-
const file = process.cwd() + `/${fileName}.json`;
|
|
218
|
-
return file;
|
|
219
|
-
}
|
|
220
212
|
runPlatforms(target, parameters, otherParams) {
|
|
221
213
|
target.forEach((t) => {
|
|
222
214
|
const cmd = `bundle exec fastlane ${t} build ${parameters.join(' ')} --env ${otherParams.env}`;
|
|
@@ -228,7 +220,7 @@ class Build extends command_1.Command {
|
|
|
228
220
|
const { flags } = this.parse(Build);
|
|
229
221
|
const params = await this.askForMissingFields(flags);
|
|
230
222
|
const { client, target } = params, otherParams = tslib_1.__rest(params, ["client", "target"]);
|
|
231
|
-
const jsonFile =
|
|
223
|
+
const jsonFile = common_1.getJsonFile(otherParams.env);
|
|
232
224
|
const parameters = common_1.buildKeyValuePairs(Object.assign(Object.assign({}, otherParams), { json_file: jsonFile }));
|
|
233
225
|
if (!flags.ignore_git_reset) {
|
|
234
226
|
shell.exec(`git reset --hard && git checkout ${params.branch} && git pull`);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command, flags } from '@oclif/command';
|
|
2
|
+
export default class MatchNuke extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
|
|
7
|
+
client: flags.IOptionFlag<string | undefined>;
|
|
8
|
+
};
|
|
9
|
+
static args: {
|
|
10
|
+
name: string;
|
|
11
|
+
}[];
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable no-negated-condition */
|
|
4
|
+
const command_1 = require("@oclif/command");
|
|
5
|
+
const shell = require("shelljs");
|
|
6
|
+
const common_1 = require("../utils/common");
|
|
7
|
+
class MatchNuke extends command_1.Command {
|
|
8
|
+
async run() {
|
|
9
|
+
const clients = common_1.getDirectories('./fastlane/clients');
|
|
10
|
+
const jsonFile = common_1.getJsonFile('prod');
|
|
11
|
+
const parameters = common_1.buildKeyValuePairs({
|
|
12
|
+
json_file: jsonFile,
|
|
13
|
+
});
|
|
14
|
+
clients.forEach(client => {
|
|
15
|
+
const envPath = `fastlane/clients/${client}/fastlane`;
|
|
16
|
+
shell.cd(envPath);
|
|
17
|
+
shell.exec(`bundle exec fastlane check_version ${parameters.join(' ')}`);
|
|
18
|
+
shell.cd('../../../../');
|
|
19
|
+
shell.exec('pwd');
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = MatchNuke;
|
|
24
|
+
MatchNuke.description = 'Check live versions';
|
|
25
|
+
MatchNuke.examples = [
|
|
26
|
+
`$ rnbuilder check-version
|
|
27
|
+
Nuke certificates ./src/match-check.ts!
|
|
28
|
+
`,
|
|
29
|
+
];
|
|
30
|
+
MatchNuke.flags = {
|
|
31
|
+
help: command_1.flags.help({ char: 'h' }),
|
|
32
|
+
client: command_1.flags.string({
|
|
33
|
+
char: 'c',
|
|
34
|
+
description: 'Select client that you want to sync udids',
|
|
35
|
+
}),
|
|
36
|
+
};
|
|
37
|
+
MatchNuke.args = [{ name: 'match-check' }];
|
package/lib/utils/common.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const buildKeyValuePairs: (params: any) => string[];
|
|
2
2
|
export declare const getDirectories: (path: string) => string[];
|
|
3
3
|
export declare const getFastlaneConfigs: () => any;
|
|
4
|
+
export declare const getJsonFile: (env: string) => string;
|
|
4
5
|
export declare const getAppVersion: (env: string, client?: string | undefined, target?: string) => {
|
|
5
6
|
version: string;
|
|
6
7
|
build: number;
|
package/lib/utils/common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.capitalize = exports.normalise = exports.checkFileExists = exports.copyFile = exports.exists = exports.ensureDir = exports.copyDir = exports.getAppVersion = exports.getFastlaneConfigs = exports.getDirectories = exports.buildKeyValuePairs = void 0;
|
|
3
|
+
exports.capitalize = exports.normalise = exports.checkFileExists = exports.copyFile = exports.exists = exports.ensureDir = exports.copyDir = exports.getAppVersion = exports.getJsonFile = exports.getFastlaneConfigs = exports.getDirectories = exports.buildKeyValuePairs = void 0;
|
|
4
4
|
const fs = require("fs");
|
|
5
5
|
exports.buildKeyValuePairs = (params) => Object.keys(params).map(key => `${key}:${params[key]}`);
|
|
6
6
|
exports.getDirectories = (path) => {
|
|
@@ -20,6 +20,14 @@ exports.getFastlaneConfigs = () => {
|
|
|
20
20
|
}
|
|
21
21
|
return {};
|
|
22
22
|
};
|
|
23
|
+
exports.getJsonFile = (env) => {
|
|
24
|
+
let fileName = 'app';
|
|
25
|
+
if (env !== 'prod') {
|
|
26
|
+
fileName = `${fileName}.${env}`;
|
|
27
|
+
}
|
|
28
|
+
const file = process.cwd() + `/${fileName}.json`;
|
|
29
|
+
return file;
|
|
30
|
+
};
|
|
23
31
|
const defaultVersion = {
|
|
24
32
|
version: '0.0.1',
|
|
25
33
|
build: 1,
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.6.
|
|
1
|
+
{"version":"0.6.18","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},"ignore_cleanup":{"name":"ignore_cleanup","type":"boolean","char":"s","description":"Ignore cleanup when building","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"}]}}}
|