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

Update option step and create new option for select build system with… #53

Merged
merged 6 commits into from
Oct 6, 2021

Conversation

manuelabarca
Copy link
Contributor

@manuelabarca manuelabarca commented Oct 4, 2021

…out arguments

Checklist

  • I've read and followed the Contribution Guidelines
  • step.yml and README.md is updated with the changes (if needed)

Version

2.0.0

Context

I have created a new option within the steps so that the user can decide if he wants to use the legacy system or the new system, I have taken advantage of the same thing that the "options" option occupies to be able to send the arguments but in a more friendly way

Resolves: #50

Changes

Changes have been made to the step.yml and main.go to be able to use this new option that allows the user to switch between xcode build systems.

Investigation details

Decisions

main.go Outdated
legacyQuery := "--buildFlag='-UseModernBuildSystem=0'"
builder.SetCustomOptions(legacyQuery)
} else if configs.BuildSystem == "modern" {
modernQuery := "--buildFlag='-UseModernBuildSystem=YES'"
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency, please use YES and NO or 0 and 1, but let's not mix the two. According to this SO answer, both formats work: https://stackoverflow.com/a/51205222

@@ -119,19 +119,29 @@ inputs:
description: |-
Root directory of your Cordova project, where your Cordova config.xml exists.
is_required: true
- options: --buildFlag="-UseModernBuildSystem=0"
- options:
opts:
title: "Options to append to the cordova-cli build command"
description: |-
Use this input to specify custom options, to append to the end of the cordova-cli build command.

The new Xcode build system is now supported in cordova-ios@5.0.0 (https://github.com/apache/cordova-ios/issues/407).
Copy link
Contributor

Choose a reason for hiding this comment

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

It's safe to delete this sentence too from the description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it's safe because, it's only default "text" in input in this option, with new option you've a new system in default.

step.yml Outdated
Example:
- `--browserify`

`cordova build [OTHER_PARAMS] [options]`
- build_system: "modern"
opts:
title: "Build system"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
title: "Build system"
title: "Xcode build system"

step.yml Outdated
opts:
title: "Build system"
description: |-
The build system to use.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The build system to use.
The Xcode build system to use.

CHANGELOG.md Outdated

-----------------

### 1.2.2 (2021 Oct 04)
Copy link
Contributor

Choose a reason for hiding this comment

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

We are changing the default behavior of the step here, so let's call this version 2.0.0. The legacy build system was the default, so it's a breaking change for those who used the default step inputs.

Copy link
Contributor

@ofalvai ofalvai left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution @manuelabarca! The changes look good, I just left a few minor comments about versioning and naming things. Looking forward to merge this PR!

@manuelabarca
Copy link
Contributor Author

Thank you for the contribution @manuelabarca! The changes look good, I just left a few minor comments about versioning and naming things. Looking forward to merge this PR!

The changes have been applied, thank you very much.

@manuelabarca
Copy link
Contributor Author

PR it's ok ? Or wait other check ?

@ofalvai ofalvai merged commit 1535ba3 into bitrise-steplib:master Oct 6, 2021
@ofalvai
Copy link
Contributor

ofalvai commented Oct 6, 2021

Yes, the PR looks good, I just had to fix a broken test in CI (it's not related to the changes in this PR).
Thank you for the contribution, we appreciate it! 🚀

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

Successfully merging this pull request may close these issues.

Don't use legacy Xcode build system by default
2 participants