Skip to content

Commit caa75a7

Browse files
committed
Use ios_get_app_version action instead of bespoke method
No point in reinventing the wheel.
1 parent 1f63600 commit caa75a7

2 files changed

Lines changed: 1 addition & 16 deletions

File tree

fastlane/lanes/build.rb

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -397,21 +397,6 @@ def post_installable_build_pr_comment(app_name:, build_number:, url_slug:)
397397
)
398398
end
399399

400-
# Returns the value of `VERSION_SHORT`` from the `Version.public.xcconfig` file
401-
#
402-
# FIXME: This ought to be extracted into the release toolkit, ideally in a configurable way but with smart defaults.
403-
# See discussion in https://github.com/wordpress-mobile/WordPress-iOS/pull/16805/files/5f3009c5e0d01448cf0369656dddc1fe3757e45f#r664069046
404-
#
405-
def read_version_from_config
406-
fastlane_require 'Xcodeproj'
407-
408-
# If the file is not available, the method will raise so we should be fine not handling that case. We'll never return an empty string.
409-
File.open(File.join(PROJECT_ROOT_FOLDER, 'Config', 'Version.public.xcconfig')) do |config|
410-
configuration = Xcodeproj::Config.new(config)
411-
configuration.attributes['VERSION_SHORT']
412-
end
413-
end
414-
415400
def inject_buildkite_analytics_environment(xctestrun_path:)
416401
require 'plist'
417402

fastlane/lanes/localization.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
# Used in `update_*_metadata_on_app_store_connect` lanes.
101101
#
102102
UPLOAD_TO_APP_STORE_COMMON_PARAMS = {
103-
app_version: read_version_from_config,
103+
app_version: ios_get_app_version,
104104
skip_binary_upload: true,
105105
overwrite_screenshots: true,
106106
phased_release: true,

0 commit comments

Comments
 (0)