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.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb +0 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb +1 -9
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb +0 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/{create_release_action.rb → create_github_release_action.rb} +1 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb +0 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_backmerge_pull_request_action.rb +218 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/publish_github_release_action.rb +63 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb +0 -3
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb +2 -373
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/git_helper.rb +27 -22
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/github_helper.rb +26 -1
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb +0 -270
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata/release_note_short_metadata_block.rb +2 -2
- data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +1 -1
- metadata +9 -58
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb +0 -137
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb +0 -108
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb +0 -90
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb +0 -82
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb +0 -91
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb +0 -109
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb +0 -108
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb +0 -86
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb +0 -89
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_alpha_version.rb +0 -62
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_app_version.rb +0 -62
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_release_version.rb +0 -62
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotfix_prechecks.rb +0 -78
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb +0 -70
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +0 -98
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb +0 -74
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb +0 -67
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb +0 -83
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb +0 -87
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +0 -76
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb +0 -65
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_current_branch_is_hotfix.rb +0 -40
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb +0 -66
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.rb +0 -54
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_number.rb +0 -54
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb +0 -60
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotfix_prechecks.rb +0 -78
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_tag_build.rb +0 -44
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb +0 -46
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_git_helper.rb +0 -28
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb +0 -28
@@ -1,89 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
module SharedValues
|
4
|
-
ANDROID_FINALIZE_PRECHECKS_CUSTOM_VALUE = :ANDROID_FINALIZE_PRECHECKS_CUSTOM_VALUE
|
5
|
-
end
|
6
|
-
|
7
|
-
class AndroidFinalizePrechecksAction < Action
|
8
|
-
def self.run(params)
|
9
|
-
UI.message "Skip confirm: #{params[:skip_confirm]}"
|
10
|
-
|
11
|
-
require_relative '../../helper/android/android_version_helper'
|
12
|
-
require_relative '../../helper/android/android_git_helper'
|
13
|
-
require_relative '../../helper/git_helper'
|
14
|
-
|
15
|
-
current_branch = Fastlane::Helper::GitHelper.current_git_branch
|
16
|
-
UI.user_error!("Current branch - '#{current_branch}' - is not a release branch. Abort.") unless current_branch.start_with?('release/')
|
17
|
-
|
18
|
-
build_gradle_path = params[:build_gradle_path]
|
19
|
-
version_properties_path = params[:version_properties_path]
|
20
|
-
|
21
|
-
version = Fastlane::Helper::Android::VersionHelper.get_public_version(
|
22
|
-
build_gradle_path: build_gradle_path,
|
23
|
-
version_properties_path: version_properties_path
|
24
|
-
)
|
25
|
-
message = "Finalizing release: #{version}\n"
|
26
|
-
if params[:skip_confirm]
|
27
|
-
UI.message(message)
|
28
|
-
else
|
29
|
-
UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
|
30
|
-
end
|
31
|
-
|
32
|
-
# Check local repo status
|
33
|
-
other_action.ensure_git_status_clean
|
34
|
-
|
35
|
-
version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]
|
36
|
-
end
|
37
|
-
|
38
|
-
#####################################################
|
39
|
-
# @!group Documentation
|
40
|
-
#####################################################
|
41
|
-
|
42
|
-
def self.description
|
43
|
-
'Runs some prechecks before finalizing a release'
|
44
|
-
end
|
45
|
-
|
46
|
-
def self.details
|
47
|
-
'Runs some prechecks before finalizing a release'
|
48
|
-
end
|
49
|
-
|
50
|
-
def self.available_options
|
51
|
-
# Define all options your action supports.
|
52
|
-
|
53
|
-
# Below a few examples
|
54
|
-
[
|
55
|
-
FastlaneCore::ConfigItem.new(key: :skip_confirm,
|
56
|
-
env_name: 'FL_ANDROID_FINALIZE_PRECHECKS_SKIPCONFIRM',
|
57
|
-
description: 'Skips confirmation',
|
58
|
-
type: Boolean,
|
59
|
-
default_value: false), # the default value if the user didn't provide one
|
60
|
-
FastlaneCore::ConfigItem.new(key: :build_gradle_path,
|
61
|
-
description: 'Path to the build.gradle file',
|
62
|
-
type: String,
|
63
|
-
optional: true,
|
64
|
-
conflicting_options: [:version_properties_path]),
|
65
|
-
FastlaneCore::ConfigItem.new(key: :version_properties_path,
|
66
|
-
description: 'Path to the version.properties file',
|
67
|
-
type: String,
|
68
|
-
optional: true,
|
69
|
-
conflicting_options: [:build_gradle_path]),
|
70
|
-
]
|
71
|
-
end
|
72
|
-
|
73
|
-
def self.output
|
74
|
-
end
|
75
|
-
|
76
|
-
def self.return_value
|
77
|
-
'The current app version'
|
78
|
-
end
|
79
|
-
|
80
|
-
def self.authors
|
81
|
-
['Automattic']
|
82
|
-
end
|
83
|
-
|
84
|
-
def self.is_supported?(platform)
|
85
|
-
platform == :android
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
class AndroidGetAlphaVersionAction < Action
|
4
|
-
def self.run(params)
|
5
|
-
require_relative '../../helper/android/android_version_helper'
|
6
|
-
|
7
|
-
build_gradle_path = params[:build_gradle_path]
|
8
|
-
version_properties_path = params[:version_properties_path]
|
9
|
-
|
10
|
-
Fastlane::Helper::Android::VersionHelper.get_alpha_version(
|
11
|
-
build_gradle_path: build_gradle_path,
|
12
|
-
version_properties_path: version_properties_path
|
13
|
-
)
|
14
|
-
end
|
15
|
-
|
16
|
-
#####################################################
|
17
|
-
# @!group Documentation
|
18
|
-
#####################################################
|
19
|
-
|
20
|
-
def self.description
|
21
|
-
'Gets the alpha version of the app'
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.details
|
25
|
-
'Gets the alpha version of the app'
|
26
|
-
end
|
27
|
-
|
28
|
-
def self.available_options
|
29
|
-
[
|
30
|
-
FastlaneCore::ConfigItem.new(key: :build_gradle_path,
|
31
|
-
description: 'Path to the build.gradle file',
|
32
|
-
type: String,
|
33
|
-
optional: true,
|
34
|
-
conflicting_options: [:version_properties_path]),
|
35
|
-
FastlaneCore::ConfigItem.new(key: :version_properties_path,
|
36
|
-
description: 'Path to the version.properties file',
|
37
|
-
type: String,
|
38
|
-
optional: true,
|
39
|
-
conflicting_options: [:build_gradle_path]),
|
40
|
-
]
|
41
|
-
end
|
42
|
-
|
43
|
-
def self.output
|
44
|
-
# Define the shared values you are going to provide
|
45
|
-
end
|
46
|
-
|
47
|
-
def self.return_value
|
48
|
-
# If you method provides a return value, you can describe here what it does
|
49
|
-
'Return the alpha version of the app'
|
50
|
-
end
|
51
|
-
|
52
|
-
def self.authors
|
53
|
-
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
54
|
-
['Automattic']
|
55
|
-
end
|
56
|
-
|
57
|
-
def self.is_supported?(platform)
|
58
|
-
platform == :android
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
class AndroidGetAppVersionAction < Action
|
4
|
-
def self.run(params)
|
5
|
-
require_relative '../../helper/android/android_version_helper'
|
6
|
-
|
7
|
-
build_gradle_path = params[:build_gradle_path]
|
8
|
-
version_properties_path = params[:version_properties_path]
|
9
|
-
|
10
|
-
Fastlane::Helper::Android::VersionHelper.get_public_version(
|
11
|
-
build_gradle_path: build_gradle_path,
|
12
|
-
version_properties_path: version_properties_path
|
13
|
-
)
|
14
|
-
end
|
15
|
-
|
16
|
-
#####################################################
|
17
|
-
# @!group Documentation
|
18
|
-
#####################################################
|
19
|
-
|
20
|
-
def self.description
|
21
|
-
'Gets the public version of the app'
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.details
|
25
|
-
'Gets the public version of the app'
|
26
|
-
end
|
27
|
-
|
28
|
-
def self.available_options
|
29
|
-
[
|
30
|
-
FastlaneCore::ConfigItem.new(key: :build_gradle_path,
|
31
|
-
description: 'Path to the build.gradle file',
|
32
|
-
type: String,
|
33
|
-
optional: true,
|
34
|
-
conflicting_options: [:version_properties_path]),
|
35
|
-
FastlaneCore::ConfigItem.new(key: :version_properties_path,
|
36
|
-
description: 'Path to the version.properties file',
|
37
|
-
type: String,
|
38
|
-
optional: true,
|
39
|
-
conflicting_options: [:build_gradle_path]),
|
40
|
-
]
|
41
|
-
end
|
42
|
-
|
43
|
-
def self.output
|
44
|
-
# Define the shared values you are going to provide
|
45
|
-
end
|
46
|
-
|
47
|
-
def self.return_value
|
48
|
-
# If you method provides a return value, you can describe here what it does
|
49
|
-
'Return the public version of the app'
|
50
|
-
end
|
51
|
-
|
52
|
-
def self.authors
|
53
|
-
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
54
|
-
['Automattic']
|
55
|
-
end
|
56
|
-
|
57
|
-
def self.is_supported?(platform)
|
58
|
-
platform == :android
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
@@ -1,62 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
class AndroidGetReleaseVersionAction < Action
|
4
|
-
def self.run(params)
|
5
|
-
require_relative '../../helper/android/android_version_helper'
|
6
|
-
|
7
|
-
build_gradle_path = params[:build_gradle_path]
|
8
|
-
version_properties_path = params[:version_properties_path]
|
9
|
-
|
10
|
-
Fastlane::Helper::Android::VersionHelper.get_release_version(
|
11
|
-
build_gradle_path: build_gradle_path,
|
12
|
-
version_properties_path: version_properties_path
|
13
|
-
)
|
14
|
-
end
|
15
|
-
|
16
|
-
#####################################################
|
17
|
-
# @!group Documentation
|
18
|
-
#####################################################
|
19
|
-
|
20
|
-
def self.description
|
21
|
-
'Gets the public version of the app'
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.details
|
25
|
-
'Gets the public version of the app'
|
26
|
-
end
|
27
|
-
|
28
|
-
def self.available_options
|
29
|
-
[
|
30
|
-
FastlaneCore::ConfigItem.new(key: :build_gradle_path,
|
31
|
-
description: 'Path to the build.gradle file',
|
32
|
-
type: String,
|
33
|
-
optional: true,
|
34
|
-
conflicting_options: [:version_properties_path]),
|
35
|
-
FastlaneCore::ConfigItem.new(key: :version_properties_path,
|
36
|
-
description: 'Path to the version.properties file',
|
37
|
-
type: String,
|
38
|
-
optional: true,
|
39
|
-
conflicting_options: [:build_gradle_path]),
|
40
|
-
]
|
41
|
-
end
|
42
|
-
|
43
|
-
def self.output
|
44
|
-
# Define the shared values you are going to provide
|
45
|
-
end
|
46
|
-
|
47
|
-
def self.return_value
|
48
|
-
# If you method provides a return value, you can describe here what it does
|
49
|
-
'Return the public version of the app'
|
50
|
-
end
|
51
|
-
|
52
|
-
def self.authors
|
53
|
-
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
54
|
-
['Automattic']
|
55
|
-
end
|
56
|
-
|
57
|
-
def self.is_supported?(platform)
|
58
|
-
platform == :android
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
@@ -1,78 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
class AndroidHotfixPrechecksAction < Action
|
4
|
-
def self.run(params)
|
5
|
-
UI.message "Skip confirm: #{params[:skip_confirm]}"
|
6
|
-
UI.message ''
|
7
|
-
|
8
|
-
require_relative '../../helper/android/android_version_helper'
|
9
|
-
require_relative '../../helper/android/android_git_helper'
|
10
|
-
|
11
|
-
# Evaluate previous tag
|
12
|
-
new_ver = params[:version_name]
|
13
|
-
prev_ver = Fastlane::Helper::Android::VersionHelper.calc_prev_hotfix_version_name(new_ver)
|
14
|
-
|
15
|
-
# Confirm
|
16
|
-
message = "Requested Hotfix version: #{new_ver}\n"
|
17
|
-
message << "Branching from tag: #{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_name,
|
52
|
-
env_name: 'FL_ANDROID_HOTFIX_PRECHECKS_VERSION',
|
53
|
-
description: 'The hotfix version number to create',
|
54
|
-
type: String),
|
55
|
-
FastlaneCore::ConfigItem.new(key: :skip_confirm,
|
56
|
-
env_name: 'FL_ANDROID_HOTFIX_PRECHECKS_SKIPCONFIRM',
|
57
|
-
description: 'Skips confirmation',
|
58
|
-
type: Boolean,
|
59
|
-
default_value: false),
|
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
|
-
platform == :android
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
@@ -1,70 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
class AndroidTagBuildAction < Action
|
4
|
-
def self.run(params)
|
5
|
-
require_relative '../../helper/android/android_version_helper'
|
6
|
-
require_relative '../../helper/android/android_git_helper'
|
7
|
-
|
8
|
-
build_gradle_path = params[:build_gradle_path]
|
9
|
-
version_properties_path = params[:version_properties_path]
|
10
|
-
|
11
|
-
release_ver = Fastlane::Helper::Android::VersionHelper.get_release_version(
|
12
|
-
build_gradle_path: build_gradle_path,
|
13
|
-
version_properties_path: version_properties_path
|
14
|
-
)
|
15
|
-
alpha_ver = Fastlane::Helper::Android::VersionHelper.get_alpha_version(
|
16
|
-
build_gradle_path: build_gradle_path,
|
17
|
-
version_properties_path: version_properties_path
|
18
|
-
)
|
19
|
-
Fastlane::Helper::GitHelper.create_tag(release_ver[Fastlane::Helper::Android::VersionHelper::VERSION_NAME])
|
20
|
-
Fastlane::Helper::GitHelper.create_tag(alpha_ver[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]) unless alpha_ver.nil? || (params[:tag_alpha] == false)
|
21
|
-
end
|
22
|
-
|
23
|
-
#####################################################
|
24
|
-
# @!group Documentation
|
25
|
-
#####################################################
|
26
|
-
|
27
|
-
def self.description
|
28
|
-
'Tags the current build'
|
29
|
-
end
|
30
|
-
|
31
|
-
def self.details
|
32
|
-
'Tags the current build'
|
33
|
-
end
|
34
|
-
|
35
|
-
def self.available_options
|
36
|
-
[
|
37
|
-
FastlaneCore::ConfigItem.new(key: :tag_alpha,
|
38
|
-
env_name: 'FL_ANDROID_TAG_BUILD_ALPHA',
|
39
|
-
description: 'True to skip tagging the alpha version',
|
40
|
-
type: Boolean,
|
41
|
-
default_value: true),
|
42
|
-
FastlaneCore::ConfigItem.new(key: :build_gradle_path,
|
43
|
-
description: 'Path to the build.gradle file',
|
44
|
-
type: String,
|
45
|
-
optional: true,
|
46
|
-
conflicting_options: [:version_properties_path]),
|
47
|
-
FastlaneCore::ConfigItem.new(key: :version_properties_path,
|
48
|
-
description: 'Path to the version.properties file',
|
49
|
-
type: String,
|
50
|
-
optional: true,
|
51
|
-
conflicting_options: [:build_gradle_path]),
|
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
|
-
platform == :android
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
@@ -1,98 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
class IosBetabuildPrechecksAction < Action
|
4
|
-
def self.run(params)
|
5
|
-
UI.message "Skip confirm: #{params[:skip_confirm]}"
|
6
|
-
UI.message "Work on version: #{params[:base_version]}" unless params[:base_version].nil?
|
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
|
-
# Check versions
|
16
|
-
build_version = Fastlane::Helper::Ios::VersionHelper.get_build_version
|
17
|
-
message = "The following current version has been detected: #{build_version}\n"
|
18
|
-
|
19
|
-
# Check branch
|
20
|
-
app_version = Fastlane::Helper::Ios::VersionHelper.get_public_version
|
21
|
-
UI.user_error!("#{message}Release branch for version #{app_version} doesn't exist. Abort.") unless !params[:base_version].nil? || Fastlane::Helper::GitHelper.checkout_and_pull(release: app_version)
|
22
|
-
|
23
|
-
# Check user overwrite
|
24
|
-
build_version = get_user_build_version(params[:base_version], message) unless params[:base_version].nil?
|
25
|
-
next_version = Fastlane::Helper::Ios::VersionHelper.calc_next_build_version(build_version)
|
26
|
-
|
27
|
-
# Verify
|
28
|
-
message << "Updating branch to version: #{next_version}.\n"
|
29
|
-
if params[:skip_confirm]
|
30
|
-
UI.message(message)
|
31
|
-
else
|
32
|
-
UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
|
33
|
-
end
|
34
|
-
|
35
|
-
# Check local repo status
|
36
|
-
other_action.ensure_git_status_clean
|
37
|
-
|
38
|
-
# Return the current version
|
39
|
-
build_version
|
40
|
-
end
|
41
|
-
|
42
|
-
def self.get_user_build_version(version, message)
|
43
|
-
UI.user_error!("Release branch for version #{version} doesn't exist. Abort.") unless Fastlane::Helper::GitHelper.checkout_and_pull(release: version)
|
44
|
-
build_version = Fastlane::Helper::Ios::VersionHelper.get_build_version
|
45
|
-
message << "Looking at branch release/#{version} as requested by user. Detected version: #{build_version}.\n"
|
46
|
-
build_version
|
47
|
-
end
|
48
|
-
|
49
|
-
#####################################################
|
50
|
-
# @!group Documentation
|
51
|
-
#####################################################
|
52
|
-
|
53
|
-
def self.description
|
54
|
-
'Runs some prechecks before preparing for a new test build'
|
55
|
-
end
|
56
|
-
|
57
|
-
def self.details
|
58
|
-
'Updates the relevant release branch, checks the app version and ensure the branch is clean'
|
59
|
-
end
|
60
|
-
|
61
|
-
def self.available_options
|
62
|
-
[
|
63
|
-
FastlaneCore::ConfigItem.new(key: :base_version,
|
64
|
-
env_name: 'FL_IOS_BETABUILD_PRECHECKS_BASE_VERSION',
|
65
|
-
description: 'The version to work on', # a short description of this parameter
|
66
|
-
type: String,
|
67
|
-
optional: true),
|
68
|
-
FastlaneCore::ConfigItem.new(key: :skip_confirm,
|
69
|
-
env_name: 'FL_IOS_BETABUILD_PRECHECKS_SKIPCONFIRM',
|
70
|
-
description: 'Skips confirmation',
|
71
|
-
type: Boolean,
|
72
|
-
default_value: false), # the default value if the user didn't provide one
|
73
|
-
FastlaneCore::ConfigItem.new(key: :default_branch,
|
74
|
-
env_name: 'FL_RELEASE_TOOLKIT_DEFAULT_BRANCH',
|
75
|
-
description: 'Default branch of the repository',
|
76
|
-
type: String,
|
77
|
-
default_value: Fastlane::Helper::GitHelper::DEFAULT_GIT_BRANCH),
|
78
|
-
]
|
79
|
-
end
|
80
|
-
|
81
|
-
def self.output
|
82
|
-
end
|
83
|
-
|
84
|
-
def self.return_value
|
85
|
-
# If you method provides a return value, you can describe here what it does
|
86
|
-
end
|
87
|
-
|
88
|
-
def self.authors
|
89
|
-
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
90
|
-
['Automattic']
|
91
|
-
end
|
92
|
-
|
93
|
-
def self.is_supported?(platform)
|
94
|
-
%i[ios mac].include?(platform)
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
end
|
@@ -1,74 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
class IosBuildPrechecksAction < Action
|
4
|
-
def self.run(params)
|
5
|
-
require_relative '../../helper/ios/ios_version_helper'
|
6
|
-
|
7
|
-
message = ''
|
8
|
-
message << "Building version #{Fastlane::Helper::Ios::VersionHelper.get_internal_version} and uploading to App Center\n" if params[:internal]
|
9
|
-
message << "Building version #{Fastlane::Helper::Ios::VersionHelper.get_build_version} and uploading to App Center\n" if params[:internal_on_single_version]
|
10
|
-
message << "Building version #{Fastlane::Helper::Ios::VersionHelper.get_build_version} and uploading to TestFlight\n" if params[:external]
|
11
|
-
|
12
|
-
if params[:skip_confirm]
|
13
|
-
UI.message(message)
|
14
|
-
else
|
15
|
-
UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
|
16
|
-
end
|
17
|
-
|
18
|
-
# Check local repo status
|
19
|
-
other_action.ensure_git_status_clean unless other_action.is_ci
|
20
|
-
end
|
21
|
-
|
22
|
-
#####################################################
|
23
|
-
# @!group Documentation
|
24
|
-
#####################################################
|
25
|
-
|
26
|
-
def self.description
|
27
|
-
'Runs some prechecks before the build'
|
28
|
-
end
|
29
|
-
|
30
|
-
def self.details
|
31
|
-
'Runs some prechecks before the build'
|
32
|
-
end
|
33
|
-
|
34
|
-
def self.available_options
|
35
|
-
[
|
36
|
-
FastlaneCore::ConfigItem.new(key: :skip_confirm,
|
37
|
-
env_name: 'FL_IOS_BUILD_PRECHECKS_SKIP_CONFIRM',
|
38
|
-
description: 'True to avoid the system ask for confirmation',
|
39
|
-
type: Boolean,
|
40
|
-
default_value: false),
|
41
|
-
FastlaneCore::ConfigItem.new(key: :internal,
|
42
|
-
env_name: 'FL_IOS_BUILD_PRECHECKS_INTERNAL_BUILD',
|
43
|
-
description: 'True if this is for an internal build',
|
44
|
-
type: Boolean,
|
45
|
-
default_value: false),
|
46
|
-
FastlaneCore::ConfigItem.new(key: :external,
|
47
|
-
env_name: 'FL_IOS_BUILD_PRECHECKS_EXTERNAL_BUILD',
|
48
|
-
description: 'True if this is for a public build',
|
49
|
-
type: Boolean,
|
50
|
-
default_value: false),
|
51
|
-
FastlaneCore::ConfigItem.new(key: :internal_on_single_version,
|
52
|
-
env_name: 'FL_IOS_BUILD_PRECHECKS_INTERNAL_SV_BUILD',
|
53
|
-
description: 'True if this is for an internal build that follows the same versioning of the external',
|
54
|
-
type: Boolean,
|
55
|
-
default_value: false),
|
56
|
-
]
|
57
|
-
end
|
58
|
-
|
59
|
-
def self.output
|
60
|
-
end
|
61
|
-
|
62
|
-
def self.return_value
|
63
|
-
end
|
64
|
-
|
65
|
-
def self.authors
|
66
|
-
['Automattic']
|
67
|
-
end
|
68
|
-
|
69
|
-
def self.is_supported?(platform)
|
70
|
-
%i[ios mac].include?(platform)
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
@@ -1,67 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Actions
|
3
|
-
class IosBumpVersionBetaAction < Action
|
4
|
-
def self.run(params)
|
5
|
-
UI.message 'Bumping app release version...'
|
6
|
-
|
7
|
-
require_relative '../../helper/ios/ios_git_helper'
|
8
|
-
require_relative '../../helper/ios/ios_version_helper'
|
9
|
-
|
10
|
-
# Verify that the current branch is a release branch. Notice that `ensure_git_branch` expects a RegEx parameter
|
11
|
-
ensure_git_branch(branch: '^release/')
|
12
|
-
create_config
|
13
|
-
show_config
|
14
|
-
|
15
|
-
UI.message 'Updating XcConfig...'
|
16
|
-
Fastlane::Helper::Ios::VersionHelper.update_xc_configs(@new_beta_version, @short_version, @new_internal_version)
|
17
|
-
UI.message 'Done!'
|
18
|
-
|
19
|
-
Fastlane::Helper::Ios::GitHelper.commit_version_bump
|
20
|
-
end
|
21
|
-
|
22
|
-
#####################################################
|
23
|
-
# @!group Documentation
|
24
|
-
#####################################################
|
25
|
-
|
26
|
-
def self.description
|
27
|
-
'Bumps the version of the app for a new beta'
|
28
|
-
end
|
29
|
-
|
30
|
-
def self.details
|
31
|
-
'Bumps the version of the app for a new beta'
|
32
|
-
end
|
33
|
-
|
34
|
-
def self.available_options
|
35
|
-
end
|
36
|
-
|
37
|
-
def self.output
|
38
|
-
end
|
39
|
-
|
40
|
-
def self.return_value
|
41
|
-
end
|
42
|
-
|
43
|
-
def self.authors
|
44
|
-
['Automattic']
|
45
|
-
end
|
46
|
-
|
47
|
-
def self.is_supported?(platform)
|
48
|
-
%i[ios mac].include?(platform)
|
49
|
-
end
|
50
|
-
|
51
|
-
def self.create_config
|
52
|
-
@current_version = Fastlane::Helper::Ios::VersionHelper.get_build_version
|
53
|
-
@current_version_internal = Fastlane::Helper::Ios::VersionHelper.get_internal_version unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
54
|
-
@new_internal_version = Fastlane::Helper::Ios::VersionHelper.create_internal_version(@current_version) unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
55
|
-
@new_beta_version = Fastlane::Helper::Ios::VersionHelper.calc_next_build_version(@current_version)
|
56
|
-
@short_version = Fastlane::Helper::Ios::VersionHelper.get_short_version_string(@new_beta_version)
|
57
|
-
end
|
58
|
-
|
59
|
-
def self.show_config
|
60
|
-
UI.message("Current build version: #{@current_version}")
|
61
|
-
UI.message("Current internal version: #{@current_version_internal}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
62
|
-
UI.message("New beta version: #{@new_beta_version}")
|
63
|
-
UI.message("New internal version: #{@new_internal_version}") unless ENV['INTERNAL_CONFIG_FILE'].nil?
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|