fastlane-plugin-wpmreleasetoolkit 11.0.3 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb +0 -2
  3. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb +1 -9
  4. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb +0 -2
  5. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/{create_release_action.rb → create_github_release_action.rb} +1 -3
  6. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb +0 -1
  7. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_backmerge_pull_request_action.rb +218 -0
  8. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/publish_github_release_action.rb +63 -0
  9. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb +0 -3
  10. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb +2 -373
  11. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/git_helper.rb +27 -22
  12. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/github_helper.rb +26 -1
  13. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb +0 -270
  14. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_short_metadata_block.rb +2 -2
  15. data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +1 -1
  16. metadata +9 -58
  17. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb +0 -137
  18. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb +0 -108
  19. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb +0 -90
  20. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb +0 -82
  21. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb +0 -91
  22. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb +0 -109
  23. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb +0 -108
  24. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb +0 -86
  25. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb +0 -89
  26. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_alpha_version.rb +0 -62
  27. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_app_version.rb +0 -62
  28. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_release_version.rb +0 -62
  29. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotfix_prechecks.rb +0 -78
  30. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb +0 -70
  31. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +0 -98
  32. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb +0 -74
  33. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb +0 -67
  34. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb +0 -83
  35. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb +0 -87
  36. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +0 -76
  37. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb +0 -65
  38. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_current_branch_is_hotfix.rb +0 -40
  39. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb +0 -66
  40. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.rb +0 -54
  41. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_number.rb +0 -54
  42. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb +0 -60
  43. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb +0 -78
  44. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_tag_build.rb +0 -44
  45. data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb +0 -46
  46. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_git_helper.rb +0 -28
  47. data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb +0 -28
@@ -1,83 +0,0 @@
1
- module Fastlane
2
- module Actions
3
- class IosBumpVersionHotfixAction < Action
4
- def self.run(params)
5
- UI.message 'Bumping app release version for hotfix...'
6
-
7
- require_relative '../../helper/ios/ios_git_helper'
8
- Fastlane::Helper::GitHelper.create_branch("release/#{params[:version]}", from: params[:previous_version])
9
- create_config(params[:previous_version], params[:version])
10
- show_config
11
-
12
- UI.message 'Updating XcConfig...'
13
- Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_version, @new_short_version, @new_version_internal)
14
- UI.message 'Done!'
15
-
16
- Fastlane::Helper::Ios::GitHelper.commit_version_bump
17
-
18
- UI.message 'Done.'
19
- end
20
-
21
- #####################################################
22
- # @!group Documentation
23
- #####################################################
24
-
25
- def self.description
26
- 'Bumps the version of the app and creates the new release branch'
27
- end
28
-
29
- def self.details
30
- 'Bumps the version of the app and creates the new release branch'
31
- end
32
-
33
- def self.available_options
34
- [
35
- FastlaneCore::ConfigItem.new(
36
- key: :version,
37
- env_name: 'FL_IOS_BUMP_VERSION_HOTFIX_VERSION',
38
- description: 'The version of the hotfix',
39
- type: String
40
- ),
41
- FastlaneCore::ConfigItem.new(
42
- key: :previous_version,
43
- env_name: 'FL_IOS_BUMP_VERSION_HOTFIX_PREVIOUS_VERSION',
44
- description: 'The version to branch from',
45
- type: String
46
- ),
47
- ]
48
- end
49
-
50
- def self.output
51
- end
52
-
53
- def self.return_value
54
- end
55
-
56
- def self.authors
57
- ['Automattic']
58
- end
59
-
60
- def self.is_supported?(platform)
61
- %i[ios mac].include?(platform)
62
- end
63
-
64
- def self.create_config(previous_version, new_short_version)
65
- @current_version = previous_version
66
- @current_version_internal = Fastlane::Helper::Ios::VersionHelper.get_internal_version unless ENV['INTERNAL_CONFIG_FILE'].nil?
67
- @new_version = "#{new_short_version}.0"
68
- @new_version_internal = Fastlane::Helper::Ios::VersionHelper.create_internal_version(@new_version) unless ENV['INTERNAL_CONFIG_FILE'].nil?
69
- @new_short_version = new_short_version
70
- @new_release_branch = "release/#{@new_short_version}"
71
- end
72
-
73
- def self.show_config
74
- UI.message("Current build version: #{@current_version}")
75
- UI.message("Current internal version: #{@current_version_internal}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
76
- UI.message("New build version: #{@new_version}")
77
- UI.message("New internal version: #{@new_version_internal}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
78
- UI.message("New short version: #{@new_short_version}")
79
- UI.message("Release branch: #{@new_release_branch}")
80
- end
81
- end
82
- end
83
- end
@@ -1,87 +0,0 @@
1
- module Fastlane
2
- module Actions
3
- class IosBumpVersionReleaseAction < Action
4
- def self.run(params)
5
- # fastlane will take care of reading in the parameter and fetching the environment variable:
6
- UI.message 'Bumping app release version...'
7
-
8
- require_relative '../../helper/ios/ios_version_helper'
9
- require_relative '../../helper/ios/ios_git_helper'
10
-
11
- default_branch = params[:default_branch]
12
- other_action.ensure_git_branch(branch: default_branch)
13
-
14
- # Create new configuration
15
- @new_version = Fastlane::Helper::Ios::VersionHelper.bump_version_release
16
- create_config
17
- show_config
18
-
19
- # Update local default branch and create branch from it
20
- Fastlane::Helper::GitHelper.checkout_and_pull(default_branch)
21
- Fastlane::Helper::GitHelper.create_branch(@new_release_branch, from: default_branch)
22
- UI.message 'Done!'
23
-
24
- UI.message 'Updating XcConfig...'
25
- Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_version, @new_short_version, @new_version_internal)
26
- UI.message 'Done!'
27
-
28
- Fastlane::Helper::Ios::GitHelper.commit_version_bump
29
-
30
- UI.message 'Done.'
31
- end
32
-
33
- #####################################################
34
- # @!group Documentation
35
- #####################################################
36
-
37
- def self.description
38
- 'Bumps the version of the app and creates the new release branch'
39
- end
40
-
41
- def self.details
42
- 'Bumps the version of the app and creates the new release branch'
43
- end
44
-
45
- def self.available_options
46
- [
47
- FastlaneCore::ConfigItem.new(key: :default_branch,
48
- env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH',
49
- description: 'Default branch of the repository',
50
- type: String,
51
- default_value: Fastlane::Helper::GitHelper::DEFAULT_GIT_BRANCH),
52
- ]
53
- end
54
-
55
- def self.output
56
- end
57
-
58
- def self.return_value
59
- end
60
-
61
- def self.authors
62
- ['Automattic']
63
- end
64
-
65
- def self.is_supported?(platform)
66
- %i[ios mac].include?(platform)
67
- end
68
-
69
- def self.create_config
70
- @current_version = Fastlane::Helper::Ios::VersionHelper.get_build_version
71
- @current_version_internal = Fastlane::Helper::Ios::VersionHelper.get_internal_version unless ENV['INTERNAL_CONFIG_FILE'].nil?
72
- @new_version_internal = Fastlane::Helper::Ios::VersionHelper.create_internal_version(@new_version) unless ENV['INTERNAL_CONFIG_FILE'].nil?
73
- @new_short_version = Fastlane::Helper::Ios::VersionHelper.get_short_version_string(@new_version)
74
- @new_release_branch = "release/#{@new_short_version}"
75
- end
76
-
77
- def self.show_config
78
- UI.message("Current build version: #{@current_version}")
79
- UI.message("Current internal version: #{@current_version_internal}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
80
- UI.message("New build version: #{@new_version}")
81
- UI.message("New internal version: #{@new_version_internal}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
82
- UI.message("New short version: #{@new_short_version}")
83
- UI.message("Release branch: #{@new_release_branch}")
84
- end
85
- end
86
- end
87
- end
@@ -1,76 +0,0 @@
1
- module Fastlane
2
- module Actions
3
- class IosCodefreezePrechecksAction < Action
4
- def self.run(params)
5
- # fastlane will take care of reading in the parameter and fetching the environment variable:
6
- UI.message "Skip confirm on code freeze: #{params[:skip_confirm]}"
7
-
8
- require_relative '../../helper/ios/ios_version_helper'
9
- require_relative '../../helper/ios/ios_git_helper'
10
-
11
- # Checkout default branch and update
12
- default_branch = params[:default_branch]
13
- Fastlane::Helper::GitHelper.checkout_and_pull(default_branch)
14
-
15
- # Create versions
16
- current_version = Fastlane::Helper::Ios::VersionHelper.get_public_version
17
- current_build_version = Fastlane::Helper::Ios::VersionHelper.get_build_version
18
- next_version = Fastlane::Helper::Ios::VersionHelper.calc_next_release_version(current_version)
19
-
20
- # Ask user confirmation
21
- unless params[:skip_confirm] || UI.confirm("Building a new release branch starting from #{default_branch}.\nCurrent version is #{current_version} (#{current_build_version}).\nAfter code freeze the new version will be: #{next_version}.\nDo you want to continue?")
22
- UI.user_error!('Aborted by user request')
23
- end
24
-
25
- # Check local repo status
26
- other_action.ensure_git_status_clean
27
-
28
- # Return the current version
29
- current_version
30
- end
31
-
32
- #####################################################
33
- # @!group Documentation
34
- #####################################################
35
-
36
- def self.description
37
- 'Runs some prechecks before code freeze'
38
- end
39
-
40
- def self.details
41
- 'Updates the default branch, checks the app version and ensure the branch is clean'
42
- end
43
-
44
- def self.available_options
45
- # Define all options your action supports.
46
- [
47
- FastlaneCore::ConfigItem.new(key: :skip_confirm,
48
- env_name: 'FL_IOS_CODEFREEZE_PRECHECKS_SKIPCONFIRM',
49
- description: 'Skips confirmation before code freeze',
50
- type: Boolean,
51
- default_value: false), # the default value if the user didn't provide one
52
- FastlaneCore::ConfigItem.new(key: :default_branch,
53
- env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH',
54
- description: 'Default branch of the repository',
55
- type: String,
56
- default_value: Fastlane::Helper::GitHelper::DEFAULT_GIT_BRANCH),
57
- ]
58
- end
59
-
60
- def self.output
61
- end
62
-
63
- def self.return_value
64
- 'Version of the app before code freeze'
65
- end
66
-
67
- def self.authors
68
- ['Automattic']
69
- end
70
-
71
- def self.is_supported?(platform)
72
- %i[ios mac].include?(platform)
73
- end
74
- end
75
- end
76
- end
@@ -1,65 +0,0 @@
1
- module Fastlane
2
- module Actions
3
- class IosCompletecodefreezePrechecksAction < Action
4
- def self.run(params)
5
- UI.message "Skip confirm: #{params[:skip_confirm]}"
6
-
7
- require_relative '../../helper/ios/ios_version_helper'
8
- require_relative '../../helper/ios/ios_git_helper'
9
- require_relative '../../helper/git_helper'
10
-
11
- current_branch = Fastlane::Helper::GitHelper.current_git_branch
12
- UI.user_error!("Current branch - '#{current_branch}' - is not a release branch. Abort.") unless current_branch.start_with?('release/')
13
-
14
- version = Fastlane::Helper::Ios::VersionHelper.get_public_version
15
- message = "Completing code freeze for: #{version}\n"
16
- if params[:skip_confirm]
17
- UI.message(message)
18
- else
19
- UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
20
- end
21
-
22
- # Check local repo status
23
- other_action.ensure_git_status_clean
24
-
25
- version
26
- end
27
-
28
- #####################################################
29
- # @!group Documentation
30
- #####################################################
31
-
32
- def self.description
33
- 'Runs some prechecks before finalizing a code freeze'
34
- end
35
-
36
- def self.details
37
- 'Runs some prechecks before finalizing a code freeze'
38
- end
39
-
40
- def self.available_options
41
- [
42
- FastlaneCore::ConfigItem.new(key: :skip_confirm,
43
- env_name: 'FL_IOS_COMPLETECODEFREEZE_PRECHECKS_SKIPCONFIRM',
44
- description: 'Skips confirmation',
45
- type: Boolean,
46
- default_value: false), # the default value if the user didn't provide one
47
- ]
48
- end
49
-
50
- def self.output
51
- end
52
-
53
- def self.return_value
54
- end
55
-
56
- def self.authors
57
- ['Automattic']
58
- end
59
-
60
- def self.is_supported?(platform)
61
- %i[ios mac].include?(platform)
62
- end
63
- end
64
- end
65
- end
@@ -1,40 +0,0 @@
1
- module Fastlane
2
- module Actions
3
- class IosCurrentBranchIsHotfixAction < Action
4
- def self.run(params)
5
- require_relative '../../helper/ios/ios_version_helper'
6
- Fastlane::Helper::Ios::VersionHelper.is_hotfix?(Fastlane::Helper::Ios::VersionHelper.get_public_version)
7
- end
8
-
9
- #####################################################
10
- # @!group Documentation
11
- #####################################################
12
-
13
- def self.description
14
- 'Checks if the current branch is for a hotfix'
15
- end
16
-
17
- def self.details
18
- 'Checks if the current branch is for a hotfix'
19
- end
20
-
21
- def self.available_options
22
- end
23
-
24
- def self.output
25
- end
26
-
27
- def self.return_value
28
- 'True if the branch is for a hotfix, false otherwise'
29
- end
30
-
31
- def self.authors
32
- ['Automattic']
33
- end
34
-
35
- def self.is_supported?(platform)
36
- %i[ios mac].include?(platform)
37
- end
38
- end
39
- end
40
- end
@@ -1,66 +0,0 @@
1
- module Fastlane
2
- module Actions
3
- class IosFinalizePrechecksAction < Action
4
- def self.run(params)
5
- UI.message "Skip confirm: #{params[:skip_confirm]}"
6
-
7
- require_relative '../../helper/ios/ios_version_helper'
8
- require_relative '../../helper/ios/ios_git_helper'
9
- require_relative '../../helper/git_helper'
10
-
11
- current_branch = Fastlane::Helper::GitHelper.current_git_branch
12
- UI.user_error!("Current branch - '#{current_branch}' - is not a release branch. Abort.") unless current_branch.start_with?('release/')
13
-
14
- version = Fastlane::Helper::Ios::VersionHelper.get_public_version
15
- message = "Finalizing release: #{version}\n"
16
- if params[:skip_confirm]
17
- UI.message(message)
18
- else
19
- UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
20
- end
21
-
22
- # Check local repo status
23
- other_action.ensure_git_status_clean
24
-
25
- version
26
- end
27
-
28
- #####################################################
29
- # @!group Documentation
30
- #####################################################
31
-
32
- def self.description
33
- 'Runs some prechecks before finalizing a release'
34
- end
35
-
36
- def self.details
37
- 'Runs some prechecks before finalizing a release'
38
- end
39
-
40
- def self.available_options
41
- [
42
- FastlaneCore::ConfigItem.new(key: :skip_confirm,
43
- env_name: 'FL_IOS_FINALIZE_PRECHECKS_SKIPCONFIRM',
44
- description: 'Skips confirmation',
45
- type: Boolean,
46
- default_value: false), # the default value if the user didn't provide one
47
- ]
48
- end
49
-
50
- def self.output
51
- end
52
-
53
- def self.return_value
54
- 'The current app version'
55
- end
56
-
57
- def self.authors
58
- ['Automattic']
59
- end
60
-
61
- def self.is_supported?(platform)
62
- %i[ios mac].include?(platform)
63
- end
64
- end
65
- end
66
- end
@@ -1,54 +0,0 @@
1
- module Fastlane
2
- module Actions
3
- class IosGetAppVersionAction < Action
4
- def self.run(params)
5
- require_relative '../../helper/ios/ios_version_helper'
6
-
7
- public_version_xcconfig_file = params[:public_version_xcconfig_file]
8
- Fastlane::Helper::Ios::VersionHelper.get_xcconfig_public_version(xcconfig_file: public_version_xcconfig_file)
9
- end
10
-
11
- #####################################################
12
- # @!group Documentation
13
- #####################################################
14
-
15
- def self.description
16
- 'Gets the public version of the app'
17
- end
18
-
19
- def self.details
20
- 'Gets the public version of the app'
21
- end
22
-
23
- def self.available_options
24
- [
25
- FastlaneCore::ConfigItem.new(
26
- key: :public_version_xcconfig_file,
27
- env_name: 'FL_IOS_PUBLIC_VERSION_XCCONFIG_FILE',
28
- description: 'Path to the .xcconfig file containing the public app version',
29
- type: String,
30
- optional: false
31
- ),
32
- ]
33
- end
34
-
35
- def self.output
36
- # Define the shared values you are going to provide
37
- end
38
-
39
- def self.return_value
40
- # If you method provides a return value, you can describe here what it does
41
- 'Return the public version of the app'
42
- end
43
-
44
- def self.authors
45
- # So no one will ever forget your contribution to fastlane :) You are awesome btw!
46
- ['Automattic']
47
- end
48
-
49
- def self.is_supported?(platform)
50
- %i[ios mac].include?(platform)
51
- end
52
- end
53
- end
54
- end
@@ -1,54 +0,0 @@
1
- module Fastlane
2
- module Actions
3
- class IosGetBuildNumberAction < Action
4
- def self.run(params)
5
- require_relative '../../helper/ios/ios_version_helper'
6
-
7
- xcconfig_file_path = params[:xcconfig_file_path]
8
- Fastlane::Helper::Ios::VersionHelper.read_build_number_from_config_file(xcconfig_file_path)
9
- end
10
-
11
- #####################################################
12
- # @!group Documentation
13
- #####################################################
14
-
15
- def self.description
16
- 'Gets the build number of the app'
17
- end
18
-
19
- def self.details
20
- 'Gets the build number of the app'
21
- end
22
-
23
- def self.available_options
24
- [
25
- FastlaneCore::ConfigItem.new(
26
- key: :xcconfig_file_path,
27
- env_name: 'FL_IOS_XCCONFIG_FILE_PATH',
28
- description: 'Path to the .xcconfig file containing the build number',
29
- type: String,
30
- optional: false
31
- ),
32
- ]
33
- end
34
-
35
- def self.output
36
- # Define the shared values you are going to provide
37
- end
38
-
39
- def self.return_value
40
- # If you method provides a return value, you can describe here what it does
41
- 'Return the build number of the app'
42
- end
43
-
44
- def self.authors
45
- # So no one will ever forget your contribution to fastlane :) You are awesome btw!
46
- ['Automattic']
47
- end
48
-
49
- def self.is_supported?(platform)
50
- %i[ios mac].include?(platform)
51
- end
52
- end
53
- end
54
- end
@@ -1,60 +0,0 @@
1
- module Fastlane
2
- module Actions
3
- class IosGetBuildVersionAction < Action
4
- def self.run(params)
5
- require_relative '../../helper/ios/ios_version_helper'
6
-
7
- UI.user_error!('You need to set at least the PUBLIC_CONFIG_FILE env var to the path to the public xcconfig file') unless ENV['PUBLIC_CONFIG_FILE']
8
-
9
- if params[:internal]
10
- UI.user_error!('You need to set the INTERNAL_CONFIG_FILE env var to the path to the internal xcconfig file') unless ENV['INTERNAL_CONFIG_FILE']
11
- Fastlane::Helper::Ios::VersionHelper.get_internal_version
12
- else
13
- Fastlane::Helper::Ios::VersionHelper.get_build_version
14
- end
15
- end
16
-
17
- #####################################################
18
- # @!group Documentation
19
- #####################################################
20
-
21
- def self.description
22
- 'Gets the build version of the app'
23
- end
24
-
25
- def self.details
26
- 'Gets the build version (`VERSION_LONG`) of the app from the xcconfig file'
27
- end
28
-
29
- def self.available_options
30
- [
31
- FastlaneCore::ConfigItem.new(
32
- key: :internal,
33
- env_name: 'FL_IOS_BUILD_VERSION_INTERNAL',
34
- description: 'If true, returns the internal build version, otherwise returns the public one',
35
- type: Boolean,
36
- default_value: false
37
- ),
38
- ]
39
- end
40
-
41
- def self.output
42
- # Define the shared values you are going to provide
43
- end
44
-
45
- def self.return_value
46
- # If you method provides a return value, you can describe here what it does
47
- 'Return the public or internal build version of the app'
48
- end
49
-
50
- def self.authors
51
- # So no one will ever forget your contribution to fastlane :) You are awesome btw!
52
- ['Automattic']
53
- end
54
-
55
- def self.is_supported?(platform)
56
- %i[ios mac].include?(platform)
57
- end
58
- end
59
- end
60
- end
@@ -1,78 +0,0 @@
1
- module Fastlane
2
- module Actions
3
- class IosHotfixPrechecksAction < Action
4
- def self.run(params)
5
- UI.message "Skip confirm: #{params[:skip_confirm]}"
6
- UI.message ''
7
-
8
- require_relative '../../helper/ios/ios_version_helper'
9
- require_relative '../../helper/ios/ios_git_helper'
10
-
11
- # Evaluate previous tag
12
- new_ver = params[:version]
13
- prev_ver = Fastlane::Helper::Ios::VersionHelper.calc_prev_hotfix_version(new_ver)
14
-
15
- # Confirm
16
- message = "Requested Hotfix version: #{new_ver}\n"
17
- message << "Branching from: #{prev_ver}\n"
18
-
19
- if params[:skip_confirm]
20
- UI.message(message)
21
- else
22
- UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
23
- end
24
-
25
- # Check tags
26
- UI.crash!("Version #{new_ver} already exists! Abort!") if other_action.git_tag_exists(tag: new_ver)
27
-
28
- UI.crash!("Version #{prev_ver} is not tagged! Can't branch. Abort!") unless other_action.git_tag_exists(tag: prev_ver)
29
-
30
- # Check local repo status
31
- other_action.ensure_git_status_clean
32
-
33
- # Return the current version
34
- prev_ver
35
- end
36
-
37
- #####################################################
38
- # @!group Documentation
39
- #####################################################
40
-
41
- def self.description
42
- 'Runs some prechecks before preparing for a new hotfix'
43
- end
44
-
45
- def self.details
46
- 'Checks out a new branch from a tag and updates tags'
47
- end
48
-
49
- def self.available_options
50
- [
51
- FastlaneCore::ConfigItem.new(key: :version,
52
- env_name: 'FL_IOS_HOTFIX_PRECHECKS_VERSION',
53
- description: 'The version to work on', # a short description of this parameter
54
- type: String),
55
- FastlaneCore::ConfigItem.new(key: :skip_confirm,
56
- env_name: 'FL_IOS_HOTFIX_PRECHECKS_SKIPCONFIRM',
57
- description: 'Skips confirmation',
58
- type: Boolean,
59
- default_value: false), # the default value if the user didn't provide one
60
- ]
61
- end
62
-
63
- def self.output
64
- end
65
-
66
- def self.return_value
67
- end
68
-
69
- def self.authors
70
- ['Automattic']
71
- end
72
-
73
- def self.is_supported?(platform)
74
- %i[ios mac].include?(platform)
75
- end
76
- end
77
- end
78
- end