Skip to content

Commit ebe98e8

Browse files
authored
Merge pull request #287 from wordpress-mobile/add-skip-deliver-in-ios-hotfix-version-bump
Add option to skip updating Deliverfile to ios_bump_version_hotfix
2 parents ab7c09d + 49cebed commit ebe98e8

File tree

2 files changed

+31
-16
lines changed

2 files changed

+31
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _None_
1010

1111
### New Features
1212

13-
_None_
13+
* Add option to skip updating `Deliverfile` when creating a new hotfix version (`ios_bump_version_hotfix`) [#287]
1414

1515
### Bug Fixes
1616

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

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@ def self.run(params)
99
create_config(params[:previous_version], params[:version])
1010
show_config()
1111

12-
UI.message 'Updating Fastlane deliver file...'
13-
Fastlane::Helper::Ios::VersionHelper.update_fastlane_deliver(@new_short_version)
14-
UI.message 'Done!'
12+
update_deliverfile = params[:skip_deliver] == false
13+
if update_deliverfile
14+
UI.message 'Updating Fastlane deliver file...'
15+
Fastlane::Helper::Ios::VersionHelper.update_fastlane_deliver(@new_short_version)
16+
UI.message 'Done!'
17+
end
18+
1519
UI.message 'Updating XcConfig...'
1620
Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_version, @new_short_version, @new_version_internal)
1721
UI.message 'Done!'
1822

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

2125
UI.message 'Done.'
2226
end
@@ -34,18 +38,29 @@ def self.details
3438
end
3539

3640
def self.available_options
37-
# Define all options your action supports.
38-
39-
# Below a few examples
4041
[
41-
FastlaneCore::ConfigItem.new(key: :version,
42-
env_name: 'FL_IOS_BUMP_VERSION_HOTFIX_VERSION',
43-
description: 'The version of the hotfix',
44-
is_string: true),
45-
FastlaneCore::ConfigItem.new(key: :previous_version,
46-
env_name: 'FL_IOS_BUMP_VERSION_HOTFIX_PREVIOUS_VERSION',
47-
description: 'The version to branch from',
48-
is_string: true), # the default value if the user didn't provide one
42+
FastlaneCore::ConfigItem.new(
43+
key: :version,
44+
env_name: 'FL_IOS_BUMP_VERSION_HOTFIX_VERSION',
45+
description: 'The version of the hotfix',
46+
is_string: true
47+
),
48+
FastlaneCore::ConfigItem.new(
49+
key: :previous_version,
50+
env_name: 'FL_IOS_BUMP_VERSION_HOTFIX_PREVIOUS_VERSION',
51+
description: 'The version to branch from',
52+
is_string: true
53+
),
54+
FastlaneCore::ConfigItem.new(
55+
key: :skip_deliver,
56+
env_name: 'FL_IOS_BUMP_VERSION_HOTFIX_SKIP_DELIVER',
57+
description: 'Skips Deliverfile key update',
58+
is_string: false, # Boolean parameter
59+
optional: true,
60+
# Don't skip the Deliverfile by default. At the time of writing, 2 out of 3 consumers
61+
# still have a Deliverfile.
62+
default_value: false
63+
),
4964
]
5065
end
5166

0 commit comments

Comments
 (0)