Skip to content

Use ios_get_app_version action instead of bespoke method - #19233

Merged
mokagio merged 1 commit into
trunkfrom
mokagio/remove-get-version
Aug 24, 2022
Merged

Use ios_get_app_version action instead of bespoke method#19233
mokagio merged 1 commit into
trunkfrom
mokagio/remove-get-version

Conversation

@mokagio

@mokagio mokagio commented Aug 23, 2022

Copy link
Copy Markdown
Contributor

The result can be verified by adding a test lane such as:

lane :test_lane do
  UI.success UPLOAD_TO_APP_STORE_COMMON_PARAMS
end

The result should include app_version: 20.6 (or whichever version you have set locally).

Regression Notes

  1. Potential unintended areas of impact – N.A.
  2. What I did to test those areas of impact (or what existing automated tests I relied on) – N.A.
  3. What automated tests I added (or what prevented me from doing so) – N.A.

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes. N.A.
  • I have considered adding accessibility improvements for my changes. N.A.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary. N.A.

Comment thread fastlane/lanes/build.rb
# 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.
File.open(File.join(PROJECT_ROOT_FOLDER, 'Config', 'Version.public.xcconfig')) do |config|
configuration = Xcodeproj::Config.new(config)
configuration.attributes['VERSION_SHORT']

@mokagio mokagio Aug 23, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth pointing out that ios_get_app_version will return a value based on VERSION_LONG not VERSION_SHORT.

The two VERSION_ should always be in a consistent state, though, so that should create no issue going forward.

@mokagio mokagio self-assigned this Aug 23, 2022
@mokagio mokagio added the Tooling Build, Release, and Validation Tools label Aug 23, 2022
@mokagio mokagio added this to the 20.7 milestone Aug 23, 2022
@mokagio
mokagio enabled auto-merge August 23, 2022 23:43
@wpmobilebot

Copy link
Copy Markdown
Contributor
You can test the changes in Jetpack from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr19233-caa75a7 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@wpmobilebot

Copy link
Copy Markdown
Contributor
You can test the changes in WordPress from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr19233-caa75a7 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@AliSoftware AliSoftware left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Work as expected, the extracted version value is indeed 20.6 as intended 👍

✓ $ fl pr19233
[✔] 🚀 
[10:37:53]: ---------------------------------
[10:37:53]: --- Step: ios_get_app_version ---
[10:37:53]: ---------------------------------
[10:37:53]: ------------------------------
[10:37:53]: --- Step: default_platform ---
[10:37:53]: ------------------------------
[10:37:53]: Driving the lane 'demo' 🚀
[10:37:53]: -------------------
[10:37:53]: --- Step: is_ci ---
[10:37:53]: -------------------
[10:37:53]: ---------------------------------------
[10:37:53]: --- Step: check_for_toolkit_updates ---
[10:37:53]: ---------------------------------------
[10:37:53]: Currently using release toolkit version 5.4.0.
[10:37:53]: Checking for updates now...
[10:37:55]: Your release toolkit is up-to-date! ✅
[10:37:55]: ----------------------
[10:37:55]: --- Step: setup_ci ---
[10:37:55]: ----------------------
[10:37:55]: Not running on CI, skipping CI setup
[10:37:55]: -------------------
[10:37:55]: --- Step: is_ci ---
[10:37:55]: -------------------
[10:37:55]: {:app_version=>"20.6", :skip_binary_upload=>true, :overwrite_screenshots=>true, :phased_release=>true, :precheck_include_in_app_purchases=>false, :api_key_path=>"/Users/olivierhalligon/.configure/wordpress-ios/secrets/app_store_connect_fastlane_api_key.json", :app_rating_config_path=>"/Users/olivierhalligon/Documents/Dev/apps/WordPress-iOS/fastlane/metadata/ratings_config.json"}

Always nice to get code being deleted and FIXMEs being resolved 🎉 Nice job!

@mokagio
mokagio merged commit ad7633a into trunk Aug 24, 2022
@mokagio
mokagio deleted the mokagio/remove-get-version branch August 24, 2022 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tooling Build, Release, and Validation Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants