-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Issue Description
firebase_app_distribution_get_latest_release
implements list_project_app_releases
from Google API's FirebaseappdistributionV1
, passing page size 1, as shown on the snippet below:
Lines 17 to 34 in bdc1358
def self.run(params) | |
init_google_api_client(params[:debug]) | |
client = Google::Apis::FirebaseappdistributionV1::FirebaseAppDistributionService.new | |
client.authorization = get_authorization(params[:service_credentials_file], params[:firebase_cli_token], params[:service_credentials_json_data], params[:debug]) | |
app_id = app_id_from_params(params) | |
UI.message("⏳ Fetching latest release for app #{app_id}...") | |
parent = app_name_from_app_id(app_id) | |
begin | |
releases = client.list_project_app_releases(parent, page_size: 1).releases | |
rescue Google::Apis::Error => err | |
if err.status_code.to_i == 404 | |
UI.user_error!("#{ErrorMessage::INVALID_APP_ID}: #{app_id}") | |
else | |
UI.crash!(err) | |
end | |
end |
This by default returns the latest release by createTime
. However, considering the context of mobile app releases versioning standards, the buildVersion
parameter would be more consistent to determine which release is in fact the latest (build version number for a new release should always be greater than the previous, as enforced by public app stores - Google Play, App Store).
My suggestion is to either change this implementation to consider buildVersion as parameter to find the most recent release, or add an optional parameter to firebase_app_distribution_get_latest_release
, so the developer can select which parameter to use.
Environment
Library | Version |
---|---|
fastlane | 2.228.0 |
fastlane-plugin-firebase_app_distribution | v0.10.1 |