fastlane-plugin-wpmreleasetoolkit 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +339 -0
- data/README.md +38 -0
- data/bin/drawText +19 -0
- data/ext/drawText/extconf.rb +36 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit.rb +16 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/README.md +20 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_localize_libs_action.rb +53 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb +171 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_validate_lib_strings_action.rb +63 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_betabuild_prechecks.rb +103 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb +83 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_preflight.rb +54 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb +69 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb +58 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb +77 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb +89 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_codefreeze_prechecks.rb +79 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_completecodefreeze_prechecks.rb +68 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb +63 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_current_branch_is_hotfix.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_file_by_version.rb +79 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_download_translations_action.rb +115 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_finalize_prechecks.rb +71 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_alpha_version.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_app_version.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_get_release_version.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_hotifx_prechecks.rb +78 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_merge_translators_strings.rb +106 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_tag_build.rb +51 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_metadata.rb +52 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb +56 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/circleci_trigger_job_action.rb +63 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb +56 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_new_milestone_action.rb +59 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/create_release_action.rb +91 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb +89 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/get_prs_list_action.rb +64 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb +90 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb +170 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/promo_screenshots_action.rb +247 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/removebranchprotection_action.rb +57 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setbranchprotection_action.rb +56 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setfrozentag_action.rb +81 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_add_files_to_copy_action.rb +96 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_apply_action.rb +139 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_download_action.rb +57 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_setup_action.rb +86 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_update_action.rb +139 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_validate_action.rb +134 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb +77 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb +79 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_betabuild_prechecks.rb +92 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_prechecks.rb +74 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_build_preflight.rb +78 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb +68 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb +87 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb +114 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_check_beta_deps.rb +62 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_clear_intermediate_tags.rb +60 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_codefreeze_prechecks.rb +70 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_completecodefreeze_prechecks.rb +63 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_current_branch_is_hotfix.rb +40 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_final_tag.rb +52 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_finalize_prechecks.rb +64 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_app_version.rb +47 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_build_version.rb +60 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_get_store_app_sizes.rb +121 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_hotifx_prechecks.rb +78 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_lint_localizations.rb +167 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_localize_project.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_merge_translators_strings.rb +93 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_tag_build.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata.rb +40 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb +81 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb +56 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_validate_ci_build.rb +46 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/an_metadata_update_helper.rb +152 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_git_helper.rb +44 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb +359 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb +475 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ci_helper.rb +91 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/configure_helper.rb +282 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/encryption_helper.rb +51 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/filesystem_helper.rb +93 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/git_helper.rb +224 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/github_helper.rb +135 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_adc_app_sizes_helper.rb +74 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb +80 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_l10n_helper.rb +208 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb +348 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata_download_helper.rb +107 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata_update_helper.rb +182 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb +399 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/helper/release_notes_helper.rb +21 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/configuration.rb +40 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/models/file_reference.rb +86 -0
- data/lib/fastlane/plugin/wpmreleasetoolkit/version.rb +5 -0
- metadata +449 -0
@@ -0,0 +1,60 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class IosClearIntermediateTagsAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
UI.message("Deleting tags for version: #{params[:version]}")
|
6
|
+
|
7
|
+
require_relative '../../helper/git_helper.rb'
|
8
|
+
|
9
|
+
# Download all the remote tags prior to starting – that way we don't miss any on the server
|
10
|
+
Fastlane::Helper::GitHelper.fetch_all_tags
|
11
|
+
|
12
|
+
# Delete 4-parts version names starting with our version number
|
13
|
+
parts = params[:version].split('.')
|
14
|
+
pattern = parts.fill('*', parts.length...4).join('.') # "1.2.*.*" or "1.2.3.*"
|
15
|
+
|
16
|
+
intermediate_tags = Fastlane::Helper::GitHelper.list_local_tags(matching: pattern)
|
17
|
+
tag_count = intermediate_tags.count
|
18
|
+
|
19
|
+
return unless tag_count.positive? && UI.confirm("Are you sure you want to delete #{tag_count} tags?")
|
20
|
+
|
21
|
+
Fastlane::Helper::GitHelper.delete_tags(intermediate_tags, delete_on_remote: true)
|
22
|
+
end
|
23
|
+
|
24
|
+
#####################################################
|
25
|
+
# @!group Documentation
|
26
|
+
#####################################################
|
27
|
+
|
28
|
+
def self.description
|
29
|
+
'Cleans all the intermediate tags for the given version'
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.details
|
33
|
+
'Cleans all the intermediate tags for the given version'
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.available_options
|
37
|
+
[
|
38
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
39
|
+
env_name: 'FL_IOS_CLEAN_INTERMEDIATE_TAGS_VERSION',
|
40
|
+
description: 'The version of the tags to clear',
|
41
|
+
is_string: true),
|
42
|
+
]
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.output
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.return_value
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.authors
|
52
|
+
['loremattei']
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.is_supported?(platform)
|
56
|
+
platform == :ios
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,70 @@
|
|
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.rb'
|
9
|
+
require_relative '../../helper/ios/ios_git_helper.rb'
|
10
|
+
|
11
|
+
# Checkout develop and update
|
12
|
+
Fastlane::Helper::GitHelper.checkout_and_pull('develop')
|
13
|
+
|
14
|
+
# Create versions
|
15
|
+
current_version = Fastlane::Helper::Ios::VersionHelper.get_public_version
|
16
|
+
current_build_version = Fastlane::Helper::Ios::VersionHelper.get_build_version
|
17
|
+
next_version = Fastlane::Helper::Ios::VersionHelper.calc_next_release_version(current_version)
|
18
|
+
|
19
|
+
# Ask user confirmation
|
20
|
+
unless params[:skip_confirm]
|
21
|
+
UI.user_error!('Aborted by user request') unless UI.confirm("Building a new release branch starting from develop.\nCurrent version is #{current_version} (#{current_build_version}).\nAfter codefreeze the new version will be: #{next_version}.\nDo you want to continue?")
|
22
|
+
end
|
23
|
+
|
24
|
+
# Check local repo status
|
25
|
+
other_action.ensure_git_status_clean()
|
26
|
+
|
27
|
+
# Return the current version
|
28
|
+
current_version
|
29
|
+
end
|
30
|
+
|
31
|
+
#####################################################
|
32
|
+
# @!group Documentation
|
33
|
+
#####################################################
|
34
|
+
|
35
|
+
def self.description
|
36
|
+
'Runs some prechecks before code freeze'
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.details
|
40
|
+
'Updates the develop branch, checks the app version and ensure the branch is clean'
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.available_options
|
44
|
+
# Define all options your action supports.
|
45
|
+
[
|
46
|
+
FastlaneCore::ConfigItem.new(key: :skip_confirm,
|
47
|
+
env_name: 'FL_IOS_CODEFREEZE_PRECHECKS_SKIPCONFIRM',
|
48
|
+
description: 'Skips confirmation before codefreeze',
|
49
|
+
is_string: false, # true: verifies the input is a string, false: every kind of value
|
50
|
+
default_value: false), # the default value if the user didn't provide one
|
51
|
+
]
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.output
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.return_value
|
58
|
+
'Version of the app before code freeze'
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.authors
|
62
|
+
['loremattei']
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.is_supported?(platform)
|
66
|
+
platform == :ios
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,63 @@
|
|
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.rb'
|
8
|
+
require_relative '../../helper/ios/ios_git_helper.rb'
|
9
|
+
|
10
|
+
UI.user_error!('This is not a release branch. Abort.') unless other_action.git_branch.start_with?('release/')
|
11
|
+
|
12
|
+
version = Fastlane::Helper::Ios::VersionHelper.get_public_version
|
13
|
+
message = "Completing code freeze for: #{version}\n"
|
14
|
+
if !params[:skip_confirm]
|
15
|
+
UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
|
16
|
+
else
|
17
|
+
UI.message(message)
|
18
|
+
end
|
19
|
+
|
20
|
+
# Check local repo status
|
21
|
+
other_action.ensure_git_status_clean()
|
22
|
+
|
23
|
+
version
|
24
|
+
end
|
25
|
+
|
26
|
+
#####################################################
|
27
|
+
# @!group Documentation
|
28
|
+
#####################################################
|
29
|
+
|
30
|
+
def self.description
|
31
|
+
'Runs some prechecks before finalizing a code freeze'
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.details
|
35
|
+
'Runs some prechecks before finalizing a code freeze'
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.available_options
|
39
|
+
[
|
40
|
+
FastlaneCore::ConfigItem.new(key: :skip_confirm,
|
41
|
+
env_name: 'FL_IOS_COMPLETECODEFREEZE_PRECHECKS_SKIPCONFIRM',
|
42
|
+
description: 'Skips confirmation',
|
43
|
+
is_string: false, # true: verifies the input is a string, false: every kind of value
|
44
|
+
default_value: false), # the default value if the user didn't provide one
|
45
|
+
]
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.output
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.return_value
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.authors
|
55
|
+
['loremattei']
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.is_supported?(platform)
|
59
|
+
platform == :ios
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class IosCurrentBranchIsHotfixAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
require_relative '../../helper/ios/ios_version_helper.rb'
|
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
|
+
['loremattei']
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.is_supported?(platform)
|
36
|
+
platform == :ios
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class IosFinalTagAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
require_relative '../../helper/ios/ios_git_helper.rb'
|
6
|
+
require_relative '../../helper/ios/ios_version_helper.rb'
|
7
|
+
version = Fastlane::Helper::Ios::VersionHelper.get_public_version
|
8
|
+
|
9
|
+
UI.message("Tagging final #{version}...")
|
10
|
+
|
11
|
+
Fastlane::Helper::GitHelper.create_tag(version)
|
12
|
+
|
13
|
+
other_action.ios_clear_intermediate_tags(version: version)
|
14
|
+
end
|
15
|
+
|
16
|
+
#####################################################
|
17
|
+
# @!group Documentation
|
18
|
+
#####################################################
|
19
|
+
|
20
|
+
def self.description
|
21
|
+
'Finalize a relasae'
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.details
|
25
|
+
'Removes the temp tags and pushes the final one'
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.available_options
|
29
|
+
[
|
30
|
+
FastlaneCore::ConfigItem.new(key: :version,
|
31
|
+
env_name: 'FL_IOS_FINAL_TAG_VERSION',
|
32
|
+
description: 'The version of the release to finalize',
|
33
|
+
is_string: true),
|
34
|
+
]
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.output
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.return_value
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.authors
|
44
|
+
['loremattei']
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.is_supported?(platform)
|
48
|
+
platform == :ios
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,64 @@
|
|
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.rb'
|
8
|
+
require_relative '../../helper/ios/ios_git_helper.rb'
|
9
|
+
|
10
|
+
UI.user_error!('This is not a release branch. Abort.') unless other_action.git_branch.start_with?('release/')
|
11
|
+
|
12
|
+
version = Fastlane::Helper::Ios::VersionHelper.get_public_version
|
13
|
+
message = "Finalizing release: #{version}\n"
|
14
|
+
if !params[:skip_confirm]
|
15
|
+
UI.user_error!('Aborted by user request') unless UI.confirm("#{message}Do you want to continue?")
|
16
|
+
else
|
17
|
+
UI.message(message)
|
18
|
+
end
|
19
|
+
|
20
|
+
# Check local repo status
|
21
|
+
other_action.ensure_git_status_clean()
|
22
|
+
|
23
|
+
version
|
24
|
+
end
|
25
|
+
|
26
|
+
#####################################################
|
27
|
+
# @!group Documentation
|
28
|
+
#####################################################
|
29
|
+
|
30
|
+
def self.description
|
31
|
+
'Runs some prechecks before finalizing a release'
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.details
|
35
|
+
'Runs some prechecks before finalizing a release'
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.available_options
|
39
|
+
[
|
40
|
+
FastlaneCore::ConfigItem.new(key: :skip_confirm,
|
41
|
+
env_name: 'FL_IOS_FINALIZE_PRECHECKS_SKIPCONFIRM',
|
42
|
+
description: 'Skips confirmation',
|
43
|
+
is_string: false, # true: verifies the input is a string, false: every kind of value
|
44
|
+
default_value: false), # the default value if the user didn't provide one
|
45
|
+
]
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.output
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.return_value
|
52
|
+
'The current app version'
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.authors
|
56
|
+
['loremattei']
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.is_supported?(platform)
|
60
|
+
platform == :ios
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class IosGetAppVersionAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
require_relative '../../helper/ios/ios_version_helper.rb'
|
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
|
+
Fastlane::Helper::Ios::VersionHelper.get_public_version
|
10
|
+
end
|
11
|
+
|
12
|
+
#####################################################
|
13
|
+
# @!group Documentation
|
14
|
+
#####################################################
|
15
|
+
|
16
|
+
def self.description
|
17
|
+
'Gets the public version of the app'
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.details
|
21
|
+
'Gets the public version of the app'
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.available_options
|
25
|
+
# Define all options your action supports.
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.output
|
29
|
+
# Define the shared values you are going to provide
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.return_value
|
33
|
+
# If you method provides a return value, you can describe here what it does
|
34
|
+
'Return the public version of the app'
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.authors
|
38
|
+
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
|
39
|
+
['loremattei']
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.is_supported?(platform)
|
43
|
+
platform == :ios
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class IosGetBuildVersionAction < Action
|
4
|
+
def self.run(params)
|
5
|
+
require_relative '../../helper/ios/ios_version_helper.rb'
|
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
|
+
is_string: false, # 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
|
+
['AliSoftware']
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.is_supported?(platform)
|
56
|
+
platform == :ios
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|