Skip to content

ci: add early fastlane version check#613

Merged
guytepper merged 1 commit into
mainfrom
fastlane_verify_version
May 18, 2026
Merged

ci: add early fastlane version check#613
guytepper merged 1 commit into
mainfrom
fastlane_verify_version

Conversation

@drehelis
Copy link
Copy Markdown
Member

No description provided.

@drehelis drehelis requested a review from guytepper May 17, 2026 17:24
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new :verify_version lane to the Android Fastlane configuration, designed to prevent version code collisions by checking existing codes on Google Play. The review feedback suggests improving CI compatibility by allowing the json_key_path to fall back to an environment variable and expanding the collision check to include all active tracks (production, beta, and alpha) instead of only the internal track to ensure global uniqueness.

Comment thread android/fastlane/Fastfile
platform :android do
desc "Verify that the version code doesn't collide with existing version"
lane :verify_version do |options|
json_key_path = options[:json_key]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The json_key_path should fall back to the GOOGLE_PLAY_JSON_KEY environment variable for consistency with the deploy_internal lane. This ensures the lane works correctly in CI environments where the service account key is typically provided via environment variables rather than explicit parameters.

    json_key_path = options[:json_key] || ENV["GOOGLE_PLAY_JSON_KEY"]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

stom kvar

Comment thread android/fastlane/Fastfile

version_code = version_code.to_i

tracks_to_check = ['internal']
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Checking only the internal track is insufficient because Google Play requires version codes to be unique and generally increasing across all tracks. If a higher version code already exists in production, beta, or alpha, this check will pass but the actual deployment will fail later. It is safer to check all active tracks to ensure the version code is truly unique.

    tracks_to_check = ['production', 'beta', 'alpha', 'internal']

@guytepper guytepper merged commit 326c534 into main May 18, 2026
7 checks passed
@guytepper guytepper deleted the fastlane_verify_version branch May 18, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants