Skip to content

Conversation

@iangmaia
Copy link
Contributor

@iangmaia iangmaia commented Oct 30, 2025

See AINFRA-1478

Description

This PR enhances the version handling added in the previous iteration to assume the version received by the code freeze lane as the source of truth, ignoring potential mismatches between the ReleasesV2 version and the project's computed version.

Testing

You can make sure the calculated release branch, current version and the next version are correctly shown in the "Continue" prompt, remembering to answer N when asked to continue to cancel the code freeze.

To avoid unexpected results, comment out the lines doing ensure_git_status_clean and Fastlane::Helper::GitHelper.checkout_and_pull(DEFAULT_BRANCH) at the beginning of the lane.

You can run the start_code_freeze lane, with and without the version parameters:

  • Run bundle exec fastlane start_code_freeze
  • Run bundle exec fastlane start_code_freeze version:30.6

This will be fully tested in the next release cycle during code freeze.

@iangmaia iangmaia self-assigned this Oct 31, 2025
@iangmaia iangmaia added the category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. label Oct 31, 2025
@iangmaia iangmaia added this to the 23.7 milestone Oct 31, 2025
@iangmaia iangmaia force-pushed the iangmaia/fail-when-code-freeze-version-mismatch branch from 0f648e8 to 16ed476 Compare October 31, 2025 22:11
@iangmaia iangmaia marked this pull request as ready for review October 31, 2025 22:11
@iangmaia iangmaia force-pushed the iangmaia/fail-when-code-freeze-version-mismatch branch 2 times, most recently from 4f7ba8e to 51a65b4 Compare November 7, 2025 21:19
@iangmaia iangmaia changed the title [Tooling] Fail on Version Mismatch Between ReleasesV2 and Project [Tooling] Use ReleasesV2 version as the source of truth during Code Freeze Nov 7, 2025
@iangmaia iangmaia force-pushed the iangmaia/fail-when-code-freeze-version-mismatch branch 2 times, most recently from 1cc7d05 to 8a4865e Compare November 10, 2025 19:48
Copy link
Contributor

@mokagio mokagio left a comment

Choose a reason for hiding this comment

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

Only a nitpick.

Tested locally. Verified default call reads computes from file:

image

Verified passing parameter overrides as expected:

image

Comment on lines 1413 to 1414
version_short ||= VERSION_FILE.read_release_version
# Read the current release version from the .xcconfig file and parse it into an AppVersion object
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
version_short ||= VERSION_FILE.read_release_version
# Read the current release version from the .xcconfig file and parse it into an AppVersion object
# Read the current release version from the .xcconfig file and parse it into an AppVersion object,
# unless already given
version_short ||= VERSION_FILE.read_release_version

Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively, we could just remove the comment given the code is quite straightforward to read.

Suggested change
version_short ||= VERSION_FILE.read_release_version
# Read the current release version from the .xcconfig file and parse it into an AppVersion object
version_short ||= VERSION_FILE.read_release_version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated on 0ba464b.

@iangmaia iangmaia force-pushed the iangmaia/fail-when-code-freeze-version-mismatch branch from 8a4865e to ff9b7e2 Compare November 11, 2025 04:08
@iangmaia iangmaia force-pushed the iangmaia/fail-when-code-freeze-version-mismatch branch from 0ba464b to 9336d5f Compare November 11, 2025 19:12
@iangmaia iangmaia enabled auto-merge November 11, 2025 19:12
@iangmaia iangmaia merged commit 1b4908c into trunk Nov 11, 2025
14 checks passed
@iangmaia iangmaia deleted the iangmaia/fail-when-code-freeze-version-mismatch branch November 11, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants