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

Introduce phased release to deliver #9581

Merged
merged 7 commits into from
Jun 29, 2017
Merged

Conversation

giginet
Copy link
Collaborator

@giginet giginet commented Jun 26, 2017

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

I'd like to set phased release value with deliver.

Description

Added phased_release option on deliver.
phased_release API already have been supported on #9372. However, we can't use this via deliver.

@@ -146,6 +146,16 @@ automatic_release true
automatic_release false
```

##### phased_release

Should the app be phased release. If set to `true`, this update will be released over 7-day period using phased release. Default value is `false`.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could you tell me if this sentence is strange.
I'm not a native speaker. 😅

Copy link
Member

Choose a reason for hiding this comment

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

Enable or disable the phased releases feature of iTunes Connect. If set to true, the update will be released over a 7 day period. Default value is false.

@giginet giginet requested a review from KrauseFx June 26, 2017 05:27
Copy link
Member

@KrauseFx KrauseFx left a comment

Choose a reason for hiding this comment

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

Nice work 👍 This is awesome, thanks for the PR

@@ -111,6 +111,10 @@ def self.available_options
description: "Should the app be automatically released once it's approved?",
is_string: false,
default_value: false),
FastlaneCore::ConfigItem.new(key: :phased_release,
description: "Should the app be phased released",
Copy link
Member

Choose a reason for hiding this comment

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

Enable phased the phased release feature of iTC

@@ -146,6 +146,16 @@ automatic_release true
automatic_release false
```

##### phased_release

Should the app be phased release. If set to `true`, this update will be released over 7-day period using phased release. Default value is `false`.
Copy link
Member

Choose a reason for hiding this comment

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

Enable or disable the phased releases feature of iTunes Connect. If set to true, the update will be released over a 7 day period. Default value is false.

@@ -111,6 +111,7 @@ def upload(options)
end

v.release_on_approval = options[:automatic_release]
v.toggle_phased_release(enabled: !!options[:phased_release])
Copy link
Member

Choose a reason for hiding this comment

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

What happens when phased releases are enabled on iTunes Connect, and you ship a new release using fastlane deliver with the default value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you ship a new release using fastlane deliver with the default value?

I tried in that situation, it works well. 👍
This value might be ignored when we ship a new release.

Copy link
Member

Choose a reason for hiding this comment

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

What if:

  • iTunes Connect: you have phased releases enabled
  • deliver: You don't set anything manually and just use the default

I'd think that this would then disable phased releases on iTunes Connect, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In current behavior, if phased_release value is not specified on deliver, values on iTC is disabled automatically.

Do you mean If value is not specified, deliver should not change value on iTC?

@@ -55,6 +55,8 @@ class UploadMetadata
# Directory name it contains review information
REVIEW_INFORMATION_DIR = "review_information"

# rubocop:disable Metrics/PerceivedComplexity
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

seems ok to me

@giginet
Copy link
Collaborator Author

giginet commented Jun 28, 2017

@KrauseFx Skip toggle_phased_release when the value is not specified and I added the tests.

https://github.com/fastlane/fastlane/pull/9581/files#diff-113801503f6c061c140ffcb4f7347fa1R151

Copy link
Member

@KrauseFx KrauseFx left a comment

Choose a reason for hiding this comment

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

Did you test this for the different use-cases?

@@ -111,6 +113,7 @@ def upload(options)
end

v.release_on_approval = options[:automatic_release]
v.toggle_phased_release(enabled: !!options[:phased_release]) unless options[:phased_release].nil?
Copy link
Member

Choose a reason for hiding this comment

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

❤️

@@ -146,6 +146,16 @@ automatic_release true
automatic_release false
```

##### phased_release

Enable or disable the phased releases feature of iTunes Connect. If set to `true`, the update will be released over a 7 day period. Default value is `false`.
Copy link
Member

Choose a reason for hiding this comment

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

Default behavior is to leave whatever you defined on iTunes Connect

@giginet
Copy link
Collaborator Author

giginet commented Jun 29, 2017

I tried in several situations:

Checked new/update Deliverfile iTC behavior
✨ new true - no effects
⬆️ update true disabled change to enabled
⬆️ update false enabled change to disabled
⬆️ update nil (not specified) enabled no effects(still enabled)

Copy link
Member

@KrauseFx KrauseFx left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for the update 👍

@KrauseFx KrauseFx merged commit 279c41f into fastlane:master Jun 29, 2017
@KrauseFx
Copy link
Member

Thanks @giginet 👍

@@ -111,6 +111,11 @@ def self.available_options
description: "Should the app be automatically released once it's approved?",
is_string: false,
default_value: false),
FastlaneCore::ConfigItem.new(key: :phased_release,
description: "Enable phased the phased release feature of iTC",
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo Enable the phased release feature of iTC

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops, I'll fix this on another PR 🙇

@giginet giginet deleted the phased-release branch June 30, 2017 04:19
@d-date d-date mentioned this pull request Jun 30, 2017
4 tasks
@fastlane-bot
Copy link

Hey @giginet 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

@fastlane-bot
Copy link

Congratulations! 🎉 This was released as part of fastlane 2.44.0 🚀

dvdchr pushed a commit to dvdchr/fastlane that referenced this pull request Sep 5, 2017
* Introduce phased release to deliver

* Fix documents

* Ignore phased_release when not specified

* Add testcases for phased_release

* Disable rubocop

* Modify default behavior

* Make optional
@fastlane fastlane locked and limited conversation to collaborators Sep 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants