fastlane-plugin-wpmreleasetoolkit 5.2.0 → 5.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e23a4f49849939810617ab3f6df7fe58ca25bd81fc01001c5566f51571037fb6
4
- data.tar.gz: 79007cfcf3eaa83fd48b63b3c266bfa3e966920974bb05475bc3e5944f7a4d6b
3
+ metadata.gz: 3a29c8bfbf5d7754cf59109a7dcf521efc91fab3b4314027db41f08a95390c7b
4
+ data.tar.gz: c4abdb17c40e79e17ce13a630ac9496768364b479a2496aa26fd9e4c633cae0c
5
5
  SHA512:
6
- metadata.gz: 356d445b958e3b9af8331a03c915b4c414489ffa7c8cb26a3de46ce275b508b2c234d4c66e9003f3835b69fcfcbc6bfec9b50f2ed4525fb022325c42b935306c
7
- data.tar.gz: 57643bb076c443d7d60b5afe507698b40a39daeb8fe3ad39c58c85f223090714f6666ca39d8eb66c828935ebe71c4b3af239854cb4ba58744cbffb37c998a8c5
6
+ metadata.gz: d1050f9832b07111a7a8c1740e3ec95c2d59372449b84d901d8ec97f01f1f2ab47abf1383f743569f77666f04d76440e4d167a5d02b1e457da788b67ff8088a8
7
+ data.tar.gz: 8986d9c68fd931d1a384f8735b9d661bd7523fef0b88d18d0371379a61bbc3f25b6ede7b287d2b2b89dc6e2a315121a80324aacd1b127c64bdd996bc8e203fd8
@@ -8,7 +8,7 @@ module Fastlane
8
8
  require_relative '../../helper/release_notes_helper'
9
9
  require_relative '../../helper/git_helper'
10
10
 
11
- path = File.join(ENV['PROJECT_ROOT_FOLDER'] || '.', 'RELEASE-NOTES.txt')
11
+ path = params[:release_notes_file_path]
12
12
  next_version = Fastlane::Helper::Android::VersionHelper.calc_next_release_short_version(params[:new_version])
13
13
 
14
14
  Fastlane::Helper::ReleaseNotesHelper.add_new_section(path: path, section_title: next_version)
@@ -35,6 +35,11 @@ module Fastlane
35
35
  env_name: 'FL_ANDROID_UPDATE_RELEASE_NOTES_VERSION',
36
36
  description: 'The version we are currently freezing; An empty entry for the _next_ version after this one will be added to the release notes',
37
37
  is_string: true),
38
+ FastlaneCore::ConfigItem.new(key: :release_notes_file_path,
39
+ env_name: 'FL_ANDROID_UPDATE_RELEASE_NOTES_FILE_PATH',
40
+ description: 'The path to the release notes file to be updated',
41
+ is_string: true,
42
+ default_value: File.join(ENV['PROJECT_ROOT_FOLDER'] || '.', 'RELEASE-NOTES.txt')),
38
43
  ]
39
44
  end
40
45
 
@@ -12,10 +12,12 @@ module Fastlane
12
12
  last_stone = Fastlane::Helper::GithubHelper.get_last_milestone(repository)
13
13
  UI.message("Last detected milestone: #{last_stone[:title]} due on #{last_stone[:due_on]}.")
14
14
  milestone_duedate = last_stone[:due_on]
15
- newmilestone_duedate = (milestone_duedate.to_datetime.next_day(14).to_time).utc
15
+ milestone_duration = params[:milestone_duration]
16
+ newmilestone_duedate = (milestone_duedate.to_datetime.next_day(milestone_duration).to_time).utc
16
17
  newmilestone_number = Fastlane::Helper::Ios::VersionHelper.calc_next_release_version(last_stone[:title])
18
+ number_of_days_from_code_freeze_to_release = params[:number_of_days_from_code_freeze_to_release]
17
19
  UI.message("Next milestone: #{newmilestone_number} due on #{newmilestone_duedate}.")
18
- Fastlane::Helper::GithubHelper.create_milestone(repository, newmilestone_number, newmilestone_duedate, params[:need_appstore_submission])
20
+ Fastlane::Helper::GithubHelper.create_milestone(repository, newmilestone_number, newmilestone_duedate, milestone_duration, number_of_days_from_code_freeze_to_release, params[:need_appstore_submission])
19
21
  end
20
22
 
21
23
  def self.description
@@ -48,6 +50,18 @@ module Fastlane
48
50
  optional: true,
49
51
  is_string: false,
50
52
  default_value: false),
53
+ FastlaneCore::ConfigItem.new(key: :milestone_duration,
54
+ env_name: 'GHHELPER_MILESTONE_DURATION',
55
+ description: 'Milestone duration in number of days',
56
+ optional: true,
57
+ is_string: false,
58
+ default_value: 14),
59
+ FastlaneCore::ConfigItem.new(key: :number_of_days_from_code_freeze_to_release,
60
+ env_name: 'GHHELPER_NUMBER_OF_DAYS_FROM_CODE_FREEZE_TO_RELEASE',
61
+ description: 'Number of days from code freeze to release',
62
+ optional: true,
63
+ is_string: false,
64
+ default_value: 14),
51
65
  ]
52
66
  end
53
67
 
@@ -8,7 +8,7 @@ module Fastlane
8
8
  require_relative '../../helper/release_notes_helper'
9
9
  require_relative '../../helper/git_helper'
10
10
 
11
- path = File.join(ENV['PROJECT_ROOT_FOLDER'] || '.', 'RELEASE-NOTES.txt')
11
+ path = params[:release_notes_file_path]
12
12
  next_version = Fastlane::Helper::Ios::VersionHelper.calc_next_release_version(params[:new_version])
13
13
 
14
14
  Fastlane::Helper::ReleaseNotesHelper.add_new_section(path: path, section_title: next_version)
@@ -35,6 +35,11 @@ module Fastlane
35
35
  env_name: 'FL_IOS_UPDATE_RELEASE_NOTES_VERSION',
36
36
  description: 'The version we are currently freezing; An empty entry for the _next_ version after this one will be added to the release notes',
37
37
  is_string: true),
38
+ FastlaneCore::ConfigItem.new(key: :release_notes_file_path,
39
+ env_name: 'FL_IOS_UPDATE_RELEASE_NOTES_FILE_PATH',
40
+ description: 'The path to the release notes file to be updated',
41
+ is_string: true,
42
+ default_value: File.join(ENV['PROJECT_ROOT_FOLDER'] || '.', 'RELEASE-NOTES.txt')),
38
43
  ]
39
44
  end
40
45
 
@@ -80,9 +80,13 @@ module Fastlane
80
80
  last_stone
81
81
  end
82
82
 
83
- def self.create_milestone(repository, newmilestone_number, newmilestone_duedate, need_submission)
84
- submission_date = need_submission ? newmilestone_duedate.to_datetime.next_day(11) : newmilestone_duedate.to_datetime.next_day(14)
85
- release_date = newmilestone_duedate.to_datetime.next_day(14)
83
+ def self.create_milestone(repository, newmilestone_number, newmilestone_duedate, newmilestone_duration, number_of_days_from_code_freeze_to_release, need_submission)
84
+ # If there is a review process, we want to submit the binary 3 days before its release
85
+ #
86
+ # Using 3 days is mostly for historical reasons where we release the apps on Monday and submit them on Friday.
87
+ days_until_submission = need_submission ? (number_of_days_from_code_freeze_to_release - 3) : newmilestone_duration
88
+ submission_date = newmilestone_duedate.to_datetime.next_day(days_until_submission)
89
+ release_date = newmilestone_duedate.to_datetime.next_day(number_of_days_from_code_freeze_to_release)
86
90
  comment = "Code freeze: #{newmilestone_duedate.to_datetime.strftime('%B %d, %Y')} App Store submission: #{submission_date.strftime('%B %d, %Y')} Release: #{release_date.strftime('%B %d, %Y')}"
87
91
 
88
92
  options = {}
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Wpmreleasetoolkit
3
- VERSION = '5.2.0'
3
+ VERSION = '5.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-wpmreleasetoolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Automattic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-05 00:00:00.000000000 Z
11
+ date: 2022-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport