Class: Fastlane::Wpmreleasetoolkit::Versioning::MarketingVersionCalculator
- Inherits:
-
AbstractVersionCalculator
- Object
- AbstractVersionCalculator
- Fastlane::Wpmreleasetoolkit::Versioning::MarketingVersionCalculator
- Defined in:
- lib/fastlane/plugin/wpmreleasetoolkit/versioning/calculators/marketing_version_calculator.rb
Overview
The ‘MarketingVersionCalculator` class is a specialized version calculator for marketing versions of an app, extending the `AbstractVersionCalculator` class.
Instance Method Summary collapse
-
#next_release_version(version:) ⇒ AppVersion
Calculate the next marketing release version.
Methods inherited from AbstractVersionCalculator
#next_build_number, #next_major_version, #next_minor_version, #next_patch_version, #previous_patch_version, #release_is_hotfix?
Instance Method Details
#next_release_version(version:) ⇒ AppVersion
Calculate the next marketing release version.
This method checks if the minor version is 9. If it is, it calculates the next major version. Otherwise, it calculates the next minor version. The patch and build number components are reset to zero.
18 19 20 21 22 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/versioning/calculators/marketing_version_calculator.rb', line 18 def next_release_version(version:) UI.user_error!('Marketing Versioning: The minor version cannot be greater than 9') if version.minor > 9 version.minor == 9 ? next_major_version(version: version) : next_minor_version(version: version) end |