Class: Fastlane::Wpmreleasetoolkit::Versioning::DateBuildCodeCalculator

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/wpmreleasetoolkit/versioning/calculators/date_build_code_calculator.rb

Overview

The ‘DateBuildCodeCalculator` class is a build code calculator for apps that use date-based build codes.

Instance Method Summary collapse

Instance Method Details

#next_build_code(version:) ⇒ AppVersion

Calculate the next internal build code by setting the build number to the current date.

Parameters:

  • version (AppVersion)

    The version to calculate the next internal version for.

Returns:

  • (AppVersion)

    The next version with the build number set to the current date.



13
14
15
16
17
18
# File 'lib/fastlane/plugin/wpmreleasetoolkit/versioning/calculators/date_build_code_calculator.rb', line 13

def next_build_code(version:)
  new_version = version.dup
  new_version.build_number = today_date

  new_version
end