Skip to content

Commit 37868dd

Browse files
committed
Remove include_metadata parameter from Ios:GitHelper.commit_version_bump to reflect the changes in the latest localization tooling
1 parent 0cf4b30 commit 37868dd

File tree

6 files changed

+10
-31
lines changed

6 files changed

+10
-31
lines changed

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def self.run(params)
1515
Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_beta_version, @short_version, @new_internal_version)
1616
UI.message 'Done!'
1717

18-
Fastlane::Helper::Ios::GitHelper.commit_version_bump(include_deliverfile: false, include_metadata: false)
18+
Fastlane::Helper::Ios::GitHelper.commit_version_bump(include_deliverfile: false)
1919
end
2020

2121
#####################################################

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def self.run(params)
2020
Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_version, @new_short_version, @new_version_internal)
2121
UI.message 'Done!'
2222

23-
Fastlane::Helper::Ios::GitHelper.commit_version_bump(include_deliverfile: update_deliverfile, include_metadata: false)
23+
Fastlane::Helper::Ios::GitHelper.commit_version_bump(include_deliverfile: update_deliverfile)
2424

2525
UI.message 'Done.'
2626
end

lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ def self.run(params)
3030
UI.message 'Done!'
3131

3232
Fastlane::Helper::Ios::GitHelper.commit_version_bump(
33-
include_deliverfile: !params[:skip_deliver],
34-
include_metadata: false
33+
include_deliverfile: !params[:skip_deliver]
3534
)
3635

3736
UI.message 'Done.'

lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@ module GitHelper
1515
# @env PROJECT_NAME The name of the directory containing the project code (especially containing the Resources/ subfolder)
1616
#
1717
# @param [Bool] include_deliverfile If true (the default), includes the `fastlane/Deliverfile` in files being commited
18-
# @param [Bool] include_metadata If true (the default), includes the `.pot` file (which typically contains an entry or release notes for the new version)
1918
#
20-
def self.commit_version_bump(include_deliverfile: true, include_metadata: true)
19+
def self.commit_version_bump(include_deliverfile: true)
2120
files_list = [File.join(env_project_root(), 'config', '.')]
2221
files_list.append File.join('fastlane', 'Deliverfile') if include_deliverfile
23-
if include_metadata
24-
files_list.append File.join(env_project_root(), env_project_name(), 'Resources', get_from_env!(key: 'APP_STORE_STRINGS_FILE_NAME'))
25-
end
2622

2723
Fastlane::Helper::GitHelper.commit(message: 'Bump version number', files: files_list, push: true)
2824
end

spec/ios_bump_version_release_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
skip_deliver = false
2424

2525
expect(Fastlane::Helper::Ios::VersionHelper).to receive(:update_fastlane_deliver).with(next_version_short)
26-
expect(Fastlane::Helper::Ios::GitHelper).to receive(:commit_version_bump).with(include_deliverfile: !skip_deliver, include_metadata: false)
26+
expect(Fastlane::Helper::Ios::GitHelper).to receive(:commit_version_bump).with(include_deliverfile: !skip_deliver)
2727

2828
run_described_fastlane_action(
2929
skip_deliver: skip_deliver,
@@ -35,7 +35,7 @@
3535
skip_deliver = true
3636

3737
expect(Fastlane::Helper::Ios::VersionHelper).not_to receive(:update_fastlane_deliver)
38-
expect(Fastlane::Helper::Ios::GitHelper).to receive(:commit_version_bump).with(include_deliverfile: !skip_deliver, include_metadata: false)
38+
expect(Fastlane::Helper::Ios::GitHelper).to receive(:commit_version_bump).with(include_deliverfile: !skip_deliver)
3939

4040
run_described_fastlane_action(
4141
skip_deliver: skip_deliver,

spec/ios_git_helper_spec.rb

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,20 @@
2424
allow(described_class).to receive(:get_from_env!).and_return('')
2525
end
2626

27-
it 'commits and pushes the app version bump with deliver file and metadata' do
28-
expect(Fastlane::Helper::GitHelper).to receive(:commit) do |arg|
29-
expect_commited_files(files: arg[:files], names: %w[config Deliverfile Resources])
30-
end
31-
32-
described_class.commit_version_bump()
33-
end
34-
35-
it 'commits and pushes the app version bump with deliver file only' do
27+
it 'commits and pushes the app version bump with deliver file' do
3628
expect(Fastlane::Helper::GitHelper).to receive(:commit) do |arg|
3729
expect_commited_files(files: arg[:files], names: %w[config Deliverfile])
3830
end
3931

40-
described_class.commit_version_bump(include_metadata: false)
41-
end
42-
43-
it 'commits and pushes the app version bump with metadata only' do
44-
expect(Fastlane::Helper::GitHelper).to receive(:commit) do |arg|
45-
expect_commited_files(files: arg[:files], names: %w[config Resources])
46-
end
47-
48-
described_class.commit_version_bump(include_deliverfile: false)
32+
described_class.commit_version_bump()
4933
end
5034

51-
it 'commits and pushes the app version bump config files only, no deliver file or metadata' do
35+
it 'commits and pushes the app version bump without the deliver file' do
5236
expect(Fastlane::Helper::GitHelper).to receive(:commit) do |arg|
5337
expect_commited_files(files: arg[:files], names: %w[config])
5438
end
5539

56-
described_class.commit_version_bump(include_metadata: false, include_deliverfile: false)
40+
described_class.commit_version_bump(include_deliverfile: false)
5741
end
5842

5943
def expect_commited_files(files:, names:)

0 commit comments

Comments
 (0)