Skip to content

Commit b1c3a06

Browse files
committed
Prettify all the things
1 parent ea99dca commit b1c3a06

19 files changed

+331
-276
lines changed

cli.js

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,46 @@
11
#!/usr/bin/env node
22

3-
const list = require('./util').list;
4-
const pkg = require('./package');
5-
const program = require('commander');
6-
const rnv = require('./');
3+
const list = require("./util").list;
4+
const pkg = require("./package");
5+
const program = require("commander");
6+
const rnv = require("./");
77

88
const defaults = rnv.getDefaults();
99

1010
program
11-
.version(pkg.version)
12-
.description(pkg.description)
13-
.arguments('[projectPath]')
14-
/* eslint-disable max-len */
15-
.option('-a, --amend', 'Amend the previous commit. Also updates the latest Git tag to point to the amended commit. This is done automatically when ' + pkg.name + ' is run from the "version" or "postversion" npm script. Use "--never-amend" if you never want to amend.')
16-
.option('--skip-tag', 'For use with "--amend", if you don\'t want to update Git tags.')
17-
.option('-A, --never-amend', 'Never amend the previous commit.')
18-
.option('-b, --increment-build', 'Only increment build number.')
19-
.option('-d, --android [path]', 'Path to your "android/app/build.gradle" file.', defaults.android)
20-
.option('-i, --ios [path]', 'Path to your "ios/" folder.', defaults.ios)
21-
.option('-q, --quiet', 'Be quiet, only report errors.')
22-
.option('-r, --reset-build', 'Reset build number back to "1" (iOS only). Unlike Android\'s "versionCode", iOS doesn\'t require you to bump the "CFBundleVersion", as long as "CFBundleShortVersionString" changes. To make it consistent across platforms, ' + pkg.name + ' bumps both by default. You can use this option if you prefer to keep the build number value at "1" after every version change. If you then need to push another build under the same version, you can use "-bt ios" to increment.')
23-
.option('-t, --target <platforms>', 'Only version specified platforms, eg. "--target android,ios".', list)
24-
/* eslint-enable */
25-
.parse(process.argv);
11+
.version(pkg.version)
12+
.description(pkg.description)
13+
.arguments("[projectPath]")
14+
.option(
15+
"-a, --amend",
16+
"Amend the previous commit. Also updates the latest Git tag to point to the amended commit. This is done automatically when " +
17+
pkg.name +
18+
' is run from the "version" or "postversion" npm script. Use "--never-amend" if you never want to amend.'
19+
)
20+
.option(
21+
"--skip-tag",
22+
'For use with "--amend", if you don\'t want to update Git tags.'
23+
)
24+
.option("-A, --never-amend", "Never amend the previous commit.")
25+
.option("-b, --increment-build", "Only increment build number.")
26+
.option(
27+
"-d, --android [path]",
28+
'Path to your "android/app/build.gradle" file.',
29+
defaults.android
30+
)
31+
.option("-i, --ios [path]", 'Path to your "ios/" folder.', defaults.ios)
32+
.option("-q, --quiet", "Be quiet, only report errors.")
33+
.option(
34+
"-r, --reset-build",
35+
'Reset build number back to "1" (iOS only). Unlike Android\'s "versionCode", iOS doesn\'t require you to bump the "CFBundleVersion", as long as "CFBundleShortVersionString" changes. To make it consistent across platforms, ' +
36+
pkg.name +
37+
' bumps both by default. You can use this option if you prefer to keep the build number value at "1" after every version change. If you then need to push another build under the same version, you can use "-bt ios" to increment.'
38+
)
39+
.option(
40+
"-t, --target <platforms>",
41+
'Only version specified platforms, eg. "--target android,ios".',
42+
list
43+
)
44+
.parse(process.argv);
2645

2746
rnv.version(program);

0 commit comments

Comments
 (0)