Skip to content

Commit

Permalink
Release 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
raykle committed Mar 4, 2022
1 parent 2f2943e commit 44089b4
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
22 changes: 22 additions & 0 deletions bin/rn-release-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ program
if (codePushRelease) {
await codePushPromptHandle()
}

if (codePushRelease && codePushOptions.deploymentName !== 'Production' && bugsnagUpload) {
bugsnagUpload = false
cliOptions.bugsnagUpload = false
}

if (bugsnagUpload) {
await bugsnagPromptHandle()
}
Expand All @@ -107,13 +113,29 @@ program
if (reactNativeBundle) {
await reactNativeBundleCmd()
}

if (codePushRelease) {
await codePushCmd()
}

if (bugsnagUpload) {
await bugsnagCmd()
}

const warnTxt = chalk.bgHex('#D18F52').black('WARN:')
const warnContentChalk = chalk.hex('#D18F52')
console.log('')

if (!reactNativeBundle) {
console.log(`${warnTxt} ${warnContentChalk(`skipped run cmd: \`react-native bundle\`.`)}`)
}
if (!codePushRelease) {
console.log(`${warnTxt} ${warnContentChalk(`skipped run cmd: \`code-push release\`.`)}`)
}
if (!bugsnagUpload) {
console.log(`${warnTxt} ${warnContentChalk(`skipped run cmd: \`bugsnag upload\`.`)}`)
}

done()
} catch (err) {
fail()
Expand Down
8 changes: 4 additions & 4 deletions lib/prompt.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class Prompt {
{
type: 'list',
name: 'env',
message: `${CodePushTaskPrompt} 请选择发布环境`,
message: `${CodePushTaskPrompt} 请选择发布环境`,
prefix: taskPromptFormat('🚀'),
choices: [
{
Expand All @@ -145,7 +145,7 @@ class Prompt {
{
type: "input",
name: "targetBinaryVersion",
message: `${CodePushTaskPrompt} 请输入匹配的原生 App 版本号`,
message: `${CodePushTaskPrompt} 请输入匹配的原生 App 版本号`,
prefix: taskPromptFormat(' '),
validate: input => {
if (input.length > 0) {
Expand All @@ -170,7 +170,7 @@ class Prompt {
name: "codePushDescConfirmed",
message: `${CodePushTaskPrompt} 请确认描述:${promptMessageStrFormat(`"${desc}"`)}`,
prefix: taskPromptFormat(' '),
// default: true
default: true
}
])
.then(({ codePushDescConfirmed }) => {
Expand All @@ -192,7 +192,7 @@ class Prompt {
name: "codeBundleIdConfirmed",
message: `${BugsnagTaskPrompt} 请确认 code-Bundle-Id:${promptMessageStrFormat(`"${bundleId}"`)}`,
prefix: taskPromptFormat('🐞'),
default: false
default: true
}
])
.then(({ codeBundleIdConfirmed }) => {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rn-release-cli",
"version": "1.0.2",
"version": "1.0.3",
"description": "Command with a collection of `react-native bundle`, `release to code-push` and `upload sourcemap to bugsnag`.",
"main": "./bin/rn-release-cli.js",
"preferGlobal": true,
Expand Down

0 comments on commit 44089b4

Please sign in to comment.