-
Notifications
You must be signed in to change notification settings - Fork 23
Add android certificate, apple store id and prefix #9
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
Open
felipe-augusto
wants to merge
13
commits into
tkohout:master
Choose a base branch
from
felipe-augusto:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
4f0ac3a
Add android certifica, apple store id and prefix
565a5d6
Fix some actions and add env of password
1a3faa0
Fix p12 password same env problem
371dd15
Support cookies
bcd7957
Merge branch 'master' of https://github.com/felipe-augusto/fastlane-f…
8e5c6d3
Bump version
bcd2dc6
Use cookies from env
e4d947b
Support .p8 file
eaec304
Bump mechanize
f82efb8
Merge branch 'master' of https://github.com/felipe-augusto/fastlane-f…
29968e2
Bump version
8741a12
Fix android request
baae1dc
Support project name or ID (#1)
jl-gogovapps File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| source 'https://rubygems.org' | ||
|
|
||
| gemspec | ||
| gem 'two_captcha' | ||
|
|
||
| plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') | ||
| eval(File.read(plugins_path), binding) if File.exist?(plugins_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 111 additions & 0 deletions
111
lib/fastlane/plugin/firebase/actions/firebase_add_android_certificate.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| module Fastlane | ||
| module Actions | ||
| class FirebaseAddAndroidCertificateAction < Action | ||
|
|
||
| def self.run(params) | ||
| manager = Firebase::Manager.new | ||
| #Login | ||
| api = manager.login(params[:username], params[:password]) | ||
|
|
||
| #Select project | ||
| project = manager.select_project(params[:project_number]) | ||
|
|
||
| # Client input | ||
| type = params[:type].to_sym | ||
|
|
||
| bundle_id = params[:bundle_id] | ||
| name = params[:name] | ||
| appstore_id = params[:appstore_id] | ||
| sha256 = params[:sha256] | ||
|
|
||
| begin | ||
| client = api.add_android_certificate(project["projectNumber"], bundle_id, sha256) | ||
| rescue Firebase::Api::BadRequestError => e | ||
| if e.message != 'Requested entity already exists' then | ||
| raise | ||
| end | ||
| end | ||
|
|
||
| UI.success "Successfuly added android certificate of app #{bundle_id}" | ||
| end | ||
|
|
||
| def self.description | ||
| "An unofficial tool to access Firebase" | ||
| end | ||
|
|
||
| def self.authors | ||
| ["Tomas Kohout"] | ||
| end | ||
|
|
||
| def self.return_value | ||
| # If your method provides a return value, you can describe here what it does | ||
| end | ||
|
|
||
| def self.details | ||
| # Optional: | ||
| "Firebase helps you list your projects, create applications, download configuration files and more..." | ||
| end | ||
|
|
||
| def self.available_options | ||
| [ | ||
| FastlaneCore::ConfigItem.new(key: :username, | ||
| env_name: "FIREBASE_USERNAME", | ||
| description: "Username for your google account", | ||
| optional: false), | ||
| FastlaneCore::ConfigItem.new(key: :password, | ||
| env_name: "FIREBASE_PASSWORD", | ||
| sensitive: true, | ||
| description: "Password to your firebase account", | ||
| optional: true), | ||
| FastlaneCore::ConfigItem.new(key: :project_number, | ||
| env_name: "FIREBASE_PROJECT_NUMBER", | ||
| description: "Project number", | ||
| optional: true), | ||
| FastlaneCore::ConfigItem.new(key: :download_config, | ||
| env_name: "FIREBASE_DOWNLOAD_CONFIG", | ||
| description: "Should download config for created client", | ||
| optional: false, | ||
| is_string: false, | ||
| default_value: true), | ||
| FastlaneCore::ConfigItem.new(key: :type, | ||
| env_name: "FIREBASE_TYPE", | ||
| description: "Type of client (ios, android)", | ||
| optional: true), | ||
| FastlaneCore::ConfigItem.new(key: :bundle_id, | ||
| env_name: "FIREBASE_BUNDLE_ID", | ||
| description: "Bundle ID (package name)", | ||
| optional: false), | ||
| FastlaneCore::ConfigItem.new(key: :name, | ||
| env_name: "FIREBASE_BUNDLE_ID", | ||
| description: "Display name", | ||
| optional: true), | ||
| FastlaneCore::ConfigItem.new(key: :appstore_id, | ||
| env_name: "FIREBASE_APPSTORE_ID", | ||
| description: "AppStore ID", | ||
| optional: true), | ||
| FastlaneCore::ConfigItem.new(key: :output_path, | ||
| env_name: "FIREBASE_OUTPUT_PATH", | ||
| description: "Path for the downloaded config", | ||
| optional: false, | ||
| default_value: "./"), | ||
| FastlaneCore::ConfigItem.new(key: :output_name, | ||
| env_name: "FIREBASE_OUTPUT_NAME", | ||
| description: "Name of the downloaded file", | ||
| optional: true), | ||
| FastlaneCore::ConfigItem.new(key: :sha256, | ||
| env_name: "FIREBASE_SHA_256", | ||
| description: "SHA256 for android", | ||
| optional: false) | ||
| ] | ||
| end | ||
|
|
||
| def self.is_supported?(platform) | ||
| # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example) | ||
| # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md | ||
| # | ||
| # [:ios, :mac, :android].include?(platform) | ||
| true | ||
| end | ||
| end | ||
| end | ||
| end |
100 changes: 100 additions & 0 deletions
100
lib/fastlane/plugin/firebase/actions/firebase_add_apple_store_id.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| module Fastlane | ||
| module Actions | ||
| class FirebaseAddAppleStoreIdAction < Action | ||
|
|
||
| def self.run(params) | ||
| manager = Firebase::Manager.new | ||
| #Login | ||
| api = manager.login(params[:username], params[:password]) | ||
|
|
||
| #Select project | ||
| project = manager.select_project(params[:project_number]) | ||
|
|
||
| # Client input | ||
| type = params[:type].to_sym | ||
|
|
||
| bundle_id = params[:bundle_id] | ||
| name = params[:name] | ||
| appstore_id = params[:appstore_id] | ||
|
|
||
| client = api.add_apple_store_id(project["projectNumber"], bundle_id, appstore_id) | ||
|
|
||
| UI.success "Successfuly added apple store id of app #{bundle_id}" | ||
| end | ||
|
|
||
| def self.description | ||
| "An unofficial tool to access Firebase" | ||
| end | ||
|
|
||
| def self.authors | ||
| ["Tomas Kohout"] | ||
| end | ||
|
|
||
| def self.return_value | ||
| # If your method provides a return value, you can describe here what it does | ||
| end | ||
|
|
||
| def self.details | ||
| # Optional: | ||
| "Firebase helps you list your projects, create applications, download configuration files and more..." | ||
| end | ||
|
|
||
| def self.available_options | ||
| [ | ||
| FastlaneCore::ConfigItem.new(key: :username, | ||
| env_name: "FIREBASE_USERNAME", | ||
| description: "Username for your google account", | ||
| optional: false), | ||
| FastlaneCore::ConfigItem.new(key: :password, | ||
| env_name: "FIREBASE_PASSWORD", | ||
| sensitive: true, | ||
| description: "Password to your firebase account", | ||
| optional: true), | ||
| FastlaneCore::ConfigItem.new(key: :project_number, | ||
| env_name: "FIREBASE_PROJECT_NUMBER", | ||
| description: "Project number", | ||
| optional: true), | ||
| FastlaneCore::ConfigItem.new(key: :download_config, | ||
| env_name: "FIREBASE_DOWNLOAD_CONFIG", | ||
| description: "Should download config for created client", | ||
| optional: false, | ||
| is_string: false, | ||
| default_value: true), | ||
| FastlaneCore::ConfigItem.new(key: :type, | ||
| env_name: "FIREBASE_TYPE", | ||
| description: "Type of client (ios, android)", | ||
| optional: true), | ||
| FastlaneCore::ConfigItem.new(key: :bundle_id, | ||
| env_name: "FIREBASE_BUNDLE_ID", | ||
| description: "Bundle ID (package name)", | ||
| optional: false), | ||
| FastlaneCore::ConfigItem.new(key: :name, | ||
| env_name: "FIREBASE_BUNDLE_ID", | ||
| description: "Display name", | ||
| optional: true), | ||
| FastlaneCore::ConfigItem.new(key: :appstore_id, | ||
| env_name: "FIREBASE_APPSTORE_ID", | ||
| description: "AppStore ID", | ||
| optional: false), | ||
| FastlaneCore::ConfigItem.new(key: :output_path, | ||
| env_name: "FIREBASE_OUTPUT_PATH", | ||
| description: "Path for the downloaded config", | ||
| optional: false, | ||
| default_value: "./"), | ||
| FastlaneCore::ConfigItem.new(key: :output_name, | ||
| env_name: "FIREBASE_OUTPUT_NAME", | ||
| description: "Name of the downloaded file", | ||
| optional: true) | ||
| ] | ||
| end | ||
|
|
||
| def self.is_supported?(platform) | ||
| # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example) | ||
| # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md | ||
| # | ||
| # [:ios, :mac, :android].include?(platform) | ||
| true | ||
| end | ||
| end | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 only realized know that we can pass the
appstore_idas a param, so should remove thestore_idvariable