Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build type option to release cordova command #409

Merged
merged 6 commits into from
Mar 10, 2017

Conversation

max-mironov
Copy link
Contributor

See #392 for details

@msftclas
Copy link

msftclas commented Mar 6, 2017

@max-mironov,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

Copy link
Contributor

@richardhuaaa richardhuaaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments but otherwise looks good! Feel free to merge once they are addressed.

cli/README.md Outdated
@@ -580,6 +580,7 @@ code-push release-cordova <appName> <platform>
[--targetBinaryVersion <targetBinaryVersion>]
[--rollout <rolloutPercentage>]
[--build]
[--isReleaseBuildType]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both the --build and --isReleaseBuildType flags need to be alphabetically ordered above

cli/README.md Outdated
@@ -643,6 +644,10 @@ This is the same parameter as the one described in the [above section](#disabled

Specifies whether you want to run `cordova build` instead of `cordova prepare` (which is the default behavior), when generating your updated web assets. This is valuable if your project includes before and/or after build hooks (e.g. to transpile TypeScript), and therefore, having CodePush simply run `cordova prepare` isn't sufficient to create and release an update. If left unspecified, this defaults to `false`.

#### IsReleaseBuildType parameter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both the Build and IsReleaseBuildType sections need to be alphabetically ordered above

@@ -1175,7 +1175,9 @@ export var releaseCordova = (command: cli.IReleaseCordovaCommand): Promise<void>
throw new Error("Platform must be either \"ios\" or \"android\".");
}

var cordovaCommand: string = command.build ? "build" : "prepare";
var cordovaCommand: string = command.build ?
(command.isReleaseBuildType ? "build --release" : "build") :
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We normally name the flags that we pass through to the underlying react-native or cordova CLI's the same as they would be in the original CLI. This generally makes them more discoverable/consistent for people who already have been using the underlying CLI. I understand why it might have made sense to name it otherwise, but with all things considered do you think it makes sense to just call the flag release instead of isReleaseBuildType? (I'll leave this up to you).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Silhouettes thank you for your feedback. I thought initially about this and I was a little bit confused about naming it release because it would be semantically closer to something related to our code-push release command which actually perform the release of our updates to code push server and has nothing in common with release build flag. So I think naming this flag as release may lead to some confusion. If you don't mind I'd prefer to avoid 'release' name here in this particular case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay sure - just wanted to make sure that was considered, but sounds like you have :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants