New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prefer Google auth library and generated API client for list releases action #307
Conversation
UI.success("✅ Latest release fetched successfully. Returning release and setting Actions.lane_context[SharedValues::FIREBASE_APP_DISTRO_LATEST_RELEASE].") | ||
end | ||
Actions.lane_context[SharedValues::FIREBASE_APP_DISTRO_LATEST_RELEASE] = latest_release | ||
return latest_release | ||
end | ||
|
||
def self.map_release_hash(release) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this for backwards compatibility, because other fastlane plugins might rely on camelCase instead of snake_case?
Or is this temporary until you update the rest of the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For backwards compatibility
def refresh_token_from_firebase_tools | ||
config_path = format_config_path | ||
if File.exist?(config_path) | ||
begin | ||
firebase_tools_tokens = JSON.parse(File.read(config_path))['tokens'] | ||
if firebase_tools_tokens.nil? | ||
UI.user_error!(ErrorMessage::EMPTY_TOKENS_FIELD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might move this to a separate PR. I realized that this isn't actually an exceptional case. If they log out of the Firebase CLI (at least the version I'm using), that file will still exist it just won't have a tokens
field. In that case we just want to return nil
and continue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏🏿👏🏿👏🏿
Are you going to iteratively make the changes i.e. submit this one fix first and keep going or include all the changes in one big change?
Either. If we want to collaborate on this then I think splitting it up makes sense. The only downside of that is that we'd probably want to temporarily support both paths in the auth client. In this PR I am breaking the old path. |
Use Google Auth library for application default credentials and use generated API client instead of hand rolled client in the list releases action.