美文网首页
Fastlane集成

Fastlane集成

作者: GitArtOS | 来源:发表于2020-04-16 09:42 被阅读0次

1. Fastlane介绍

Fastlane能做什么?

  • sigh:生成并下载开发者证书
  • produce:在iTunes Connect上创建你的应用
  • gym:打包你的应用
  • snapshot:实现应用截屏并取得图片
  • pilot:将你的应用发布到TestFlight进行测试
  • deliver:将你的应用的二进制代码,截屏和原数据等信息上传到AppStore

2. 安装fastlane

ruby 需要比较新的版本,大于2.0.0

  1. 我的版本:查看版本ruby --version
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin19]
  1. 执行sudo gem install fastlane,输入密码,一阵子哆嗦,OK了
Fetching slack-notifier-2.3.2.gem
Fetching rouge-2.0.7.gem
Fetching xcpretty-0.3.0.gem
Fetching terminal-notifier-2.0.0.gem
Fetching unicode-display_width-1.7.0.gem
Fetching plist-3.5.0.gem
Fetching terminal-table-1.8.0.gem
Fetching public_suffix-2.0.5.gem
Fetching addressable-2.7.0.gem
Fetching multipart-post-2.0.0.gem
Fetching word_wrap-1.0.0.gem
Fetching tty-screen-0.7.1.gem
Fetching tty-cursor-0.7.1.gem
Fetching tty-spinner-0.9.3.gem
Fetching babosa-1.0.3.gem
Fetching colored-1.2.gem
Fetching highline-1.7.10.gem
Fetching commander-fastlane-4.4.6.gem
Fetching excon-0.73.0.gem
Fetching unf_ext-0.0.7.7.gem
Fetching unf-0.1.4.gem
Fetching domain_name-0.5.20190701.gem
Fetching http-cookie-1.0.3.gem
Fetching faraday-0.17.3.gem
Fetching faraday-cookie_jar-0.0.6.gem
Fetching faraday_middleware-0.13.1.gem
Fetching fastimage-2.1.7.gem
Fetching mini_magick-4.10.1.gem
Fetching multi_xml-0.6.0.gem
Fetching rubyzip-1.3.0.gem
Fetching security-0.1.3.gem
Fetching xcpretty-travis-formatter-1.0.0.gem
Fetching dotenv-2.7.5.gem
Fetching naturally-2.2.0.gem
Fetching simctl-1.6.8.gem
Fetching jwt-2.1.0.gem
Fetching declarative-option-0.1.0.gem
Fetching declarative-0.0.10.gem
Fetching uber-0.1.0.gem
Fetching representable-3.0.4.gem
Fetching retriable-3.1.2.gem
Fetching mini_mime-1.0.2.gem
Fetching multi_json-1.14.1.gem
Fetching signet-0.14.0.gem
Fetching memoist-0.16.2.gem
Fetching os-1.1.0.gem
Fetching googleauth-0.12.0.gem
Fetching google-api-client-0.36.4.gem
Fetching google-cloud-env-1.3.1.gem
Fetching google-cloud-errors-1.0.0.gem
Fetching google-cloud-core-1.5.0.gem
Fetching digest-crc-0.5.1.gem
Fetching google-cloud-storage-1.26.0.gem
Fetching emoji_regex-1.0.1.gem
Fetching jmespath-1.4.0.gem
Fetching aws-partitions-1.296.0.gem
Fetching aws-eventstream-1.1.0.gem
Fetching aws-sigv4-1.1.1.gem
Fetching aws-sdk-core-3.94.0.gem
Fetching aws-sdk-kms-1.30.0.gem
Fetching aws-sdk-s3-1.61.2.gem
Fetching fastlane-2.145.0.gem
Successfully installed slack-notifier-2.3.2
Successfully installed rouge-2.0.7
Successfully installed xcpretty-0.3.0
Successfully installed terminal-notifier-2.0.0
Successfully installed unicode-display_width-1.7.0
Successfully installed terminal-table-1.8.0
Successfully installed plist-3.5.0
Successfully installed public_suffix-2.0.5
Successfully installed addressable-2.7.0
Successfully installed multipart-post-2.0.0
Successfully installed word_wrap-1.0.0
Successfully installed tty-screen-0.7.1
Successfully installed tty-cursor-0.7.1
Successfully installed tty-spinner-0.9.3
Successfully installed babosa-1.0.3
Successfully installed colored-1.2
Successfully installed highline-1.7.10
Successfully installed commander-fastlane-4.4.6
Successfully installed excon-0.73.0
Building native extensions. This could take a while...
Successfully installed unf_ext-0.0.7.7
Successfully installed unf-0.1.4
Successfully installed domain_name-0.5.20190701
Successfully installed http-cookie-1.0.3
Successfully installed faraday-0.17.3
Successfully installed faraday-cookie_jar-0.0.6
Successfully installed faraday_middleware-0.13.1
Successfully installed fastimage-2.1.7
Successfully installed mini_magick-4.10.1
Successfully installed multi_xml-0.6.0
Successfully installed rubyzip-1.3.0
Successfully installed security-0.1.3
Successfully installed xcpretty-travis-formatter-1.0.0
Successfully installed dotenv-2.7.5
Successfully installed naturally-2.2.0
Successfully installed simctl-1.6.8
Successfully installed jwt-2.1.0
Successfully installed declarative-option-0.1.0
Successfully installed declarative-0.0.10
Successfully installed uber-0.1.0
Successfully installed representable-3.0.4
Successfully installed retriable-3.1.2
Successfully installed mini_mime-1.0.2
Successfully installed multi_json-1.14.1
Successfully installed signet-0.14.0
Successfully installed memoist-0.16.2
Successfully installed os-1.1.0
Successfully installed googleauth-0.12.0
Successfully installed google-api-client-0.36.4
Successfully installed google-cloud-env-1.3.1
Successfully installed google-cloud-errors-1.0.0
Successfully installed google-cloud-core-1.5.0
Successfully installed digest-crc-0.5.1
Successfully installed google-cloud-storage-1.26.0
Successfully installed emoji_regex-1.0.1
Successfully installed jmespath-1.4.0
Successfully installed aws-partitions-1.296.0
Successfully installed aws-eventstream-1.1.0
Successfully installed aws-sigv4-1.1.1
Successfully installed aws-sdk-core-3.94.0
Successfully installed aws-sdk-kms-1.30.0
Successfully installed aws-sdk-s3-1.61.2
Successfully installed fastlane-2.145.0
Parsing documentation for slack-notifier-2.3.2
Installing ri documentation for slack-notifier-2.3.2
Parsing documentation for rouge-2.0.7
Installing ri documentation for rouge-2.0.7
Parsing documentation for xcpretty-0.3.0
Installing ri documentation for xcpretty-0.3.0
Parsing documentation for terminal-notifier-2.0.0
Installing ri documentation for terminal-notifier-2.0.0
Parsing documentation for unicode-display_width-1.7.0
Installing ri documentation for unicode-display_width-1.7.0
Parsing documentation for terminal-table-1.8.0
Installing ri documentation for terminal-table-1.8.0
Parsing documentation for plist-3.5.0
Installing ri documentation for plist-3.5.0
Parsing documentation for public_suffix-2.0.5
Installing ri documentation for public_suffix-2.0.5
Parsing documentation for addressable-2.7.0
Installing ri documentation for addressable-2.7.0
invalid options: -SHN
(invalid options are ignored)
Parsing documentation for multipart-post-2.0.0
Installing ri documentation for multipart-post-2.0.0
Parsing documentation for word_wrap-1.0.0
Installing ri documentation for word_wrap-1.0.0
Parsing documentation for tty-screen-0.7.1
Installing ri documentation for tty-screen-0.7.1
Parsing documentation for tty-cursor-0.7.1
Installing ri documentation for tty-cursor-0.7.1
Parsing documentation for tty-spinner-0.9.3
Installing ri documentation for tty-spinner-0.9.3
Parsing documentation for babosa-1.0.3
Installing ri documentation for babosa-1.0.3
Parsing documentation for colored-1.2
Installing ri documentation for colored-1.2
Parsing documentation for highline-1.7.10
Installing ri documentation for highline-1.7.10
Parsing documentation for commander-fastlane-4.4.6
Installing ri documentation for commander-fastlane-4.4.6
Parsing documentation for excon-0.73.0
Installing ri documentation for excon-0.73.0
Parsing documentation for unf_ext-0.0.7.7
Installing ri documentation for unf_ext-0.0.7.7
Parsing documentation for unf-0.1.4
Installing ri documentation for unf-0.1.4
Parsing documentation for domain_name-0.5.20190701
Installing ri documentation for domain_name-0.5.20190701
Parsing documentation for http-cookie-1.0.3
Installing ri documentation for http-cookie-1.0.3
Parsing documentation for faraday-0.17.3
Installing ri documentation for faraday-0.17.3
Parsing documentation for faraday-cookie_jar-0.0.6
Installing ri documentation for faraday-cookie_jar-0.0.6
Parsing documentation for faraday_middleware-0.13.1
Installing ri documentation for faraday_middleware-0.13.1
Parsing documentation for fastimage-2.1.7
Installing ri documentation for fastimage-2.1.7
Parsing documentation for mini_magick-4.10.1
Installing ri documentation for mini_magick-4.10.1
Parsing documentation for multi_xml-0.6.0
Installing ri documentation for multi_xml-0.6.0
Parsing documentation for rubyzip-1.3.0
Installing ri documentation for rubyzip-1.3.0
Parsing documentation for security-0.1.3
Installing ri documentation for security-0.1.3
Parsing documentation for xcpretty-travis-formatter-1.0.0
Installing ri documentation for xcpretty-travis-formatter-1.0.0
Parsing documentation for dotenv-2.7.5
Installing ri documentation for dotenv-2.7.5
Parsing documentation for naturally-2.2.0
Installing ri documentation for naturally-2.2.0
Parsing documentation for simctl-1.6.8
Installing ri documentation for simctl-1.6.8
Parsing documentation for jwt-2.1.0
Installing ri documentation for jwt-2.1.0
Parsing documentation for declarative-option-0.1.0
Installing ri documentation for declarative-option-0.1.0
Parsing documentation for declarative-0.0.10
Installing ri documentation for declarative-0.0.10
Parsing documentation for uber-0.1.0
Installing ri documentation for uber-0.1.0
Parsing documentation for representable-3.0.4
Installing ri documentation for representable-3.0.4
Parsing documentation for retriable-3.1.2
Installing ri documentation for retriable-3.1.2
Parsing documentation for mini_mime-1.0.2
Installing ri documentation for mini_mime-1.0.2
Parsing documentation for multi_json-1.14.1
Installing ri documentation for multi_json-1.14.1
Parsing documentation for signet-0.14.0
Installing ri documentation for signet-0.14.0
Parsing documentation for memoist-0.16.2
Installing ri documentation for memoist-0.16.2
Parsing documentation for os-1.1.0
Installing ri documentation for os-1.1.0
Parsing documentation for googleauth-0.12.0
Installing ri documentation for googleauth-0.12.0
Parsing documentation for google-api-client-0.36.4
Installing ri documentation for google-api-client-0.36.4
Parsing documentation for google-cloud-env-1.3.1
Installing ri documentation for google-cloud-env-1.3.1
Parsing documentation for google-cloud-errors-1.0.0
Installing ri documentation for google-cloud-errors-1.0.0
Parsing documentation for google-cloud-core-1.5.0
Installing ri documentation for google-cloud-core-1.5.0
Parsing documentation for digest-crc-0.5.1
Installing ri documentation for digest-crc-0.5.1
Parsing documentation for google-cloud-storage-1.26.0
Installing ri documentation for google-cloud-storage-1.26.0
Parsing documentation for emoji_regex-1.0.1
Installing ri documentation for emoji_regex-1.0.1
Parsing documentation for jmespath-1.4.0
Installing ri documentation for jmespath-1.4.0
Parsing documentation for aws-partitions-1.296.0
Installing ri documentation for aws-partitions-1.296.0
Parsing documentation for aws-eventstream-1.1.0
Installing ri documentation for aws-eventstream-1.1.0
Parsing documentation for aws-sigv4-1.1.1
Installing ri documentation for aws-sigv4-1.1.1
Parsing documentation for aws-sdk-core-3.94.0
Installing ri documentation for aws-sdk-core-3.94.0
Parsing documentation for aws-sdk-kms-1.30.0
Installing ri documentation for aws-sdk-kms-1.30.0
Parsing documentation for aws-sdk-s3-1.61.2
Installing ri documentation for aws-sdk-s3-1.61.2
Parsing documentation for fastlane-2.145.0
Installing ri documentation for fastlane-2.145.0
Done installing documentation for slack-notifier, rouge, xcpretty, terminal-notifier, unicode-display_width, terminal-table, plist, public_suffix, addressable, multipart-post, word_wrap, tty-screen, tty-cursor, tty-spinner, babosa, colored, highline, commander-fastlane, excon, unf_ext, unf, domain_name, http-cookie, faraday, faraday-cookie_jar, faraday_middleware, fastimage, mini_magick, multi_xml, rubyzip, security, xcpretty-travis-formatter, dotenv, naturally, simctl, jwt, declarative-option, declarative, uber, representable, retriable, mini_mime, multi_json, signet, memoist, os, googleauth, google-api-client, google-cloud-env, google-cloud-errors, google-cloud-core, digest-crc, google-cloud-storage, emoji_regex, jmespath, aws-partitions, aws-eventstream, aws-sigv4, aws-sdk-core, aws-sdk-kms, aws-sdk-s3, fastlane after 260 seconds
62 gems installed

  1. 查看fastlane版本: 输入fastlane -v
-----------------------------
[✔] 🚀 
fastlane 2.145.0
  1. 查看fastlaneactions指令
fastlane actions
[✔] 🚀 
[09:48:57]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[09:48:59]: Sending anonymous analytics information
[09:48:59]: Learn more at https://docs.fastlane.tools/#metrics
[09:48:59]: No personal or sensitive data is sent.
[09:48:59]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
+--------------------------+--------------------------+------------------+
|                       Available fastlane actions                       |
+--------------------------+--------------------------+------------------+
| Action                   | Description              | Author           |
+--------------------------+--------------------------+------------------+
| adb                      | Run ADB Actions          | hjanuschka       |
| adb_devices              | Get an array of          | hjanuschka       |
|                          | Connected android        |                  |
|                          | device serials           |                  |
| add_extra_platforms      | Modify the default list  | lacostej         |
|                          | of supported platforms   |                  |
| add_git_tag              | This will add an         | Multiple         |
|                          | annotated git tag to     |                  |
|                          | the current branch       |                  |
| app_store_build_number   | Returns the current      | hjanuschka       |
|                          | build_number of either   |                  |
|                          | live or edit version     |                  |
| appaloosa                | Upload your app to       | Appaloosa        |
|                          | "Appaloosa Store"        |                  |
|                          | (https://www.appaloosa-  |                  |
|                          | store.com/ 🔗)           |                  |
| appetize                 | Upload your app to       | Multiple         |
|                          | "Appetize.io"            |                  |
|                          | (https://appetize.io/    |                  |
|                          | 🔗) to stream it in      |                  |
|                          | browser                  |                  |
| appetize_viewing_url_ge  | Generate an URL for      | KrauseFx         |
| nerator                  | appetize simulator       |                  |
| appium                   | Run UI test by Appium    | yonekawa         |
|                          | with RSpec               |                  |
| appledoc                 | Generate Apple-like      | alexmx           |
|                          | source code              |                  |
|                          | documentation from the   |                  |
|                          | source code              |                  |
| appstore                 | Alias for the            | KrauseFx         |
|                          | `upload_to_app_store`    |                  |
|                          | action                   |                  |
| apteligent               | Upload dSYM file to      | Mo7amedFouad     |
|                          | "Apteligent              |                  |
|                          | (Crittercism)"           |                  |
|                          | (http://www.apteligent.  |                  |
|                          | com/ 🔗)                 |                  |
| artifactory              | This action uploads an   | Multiple         |
|                          | artifact to artifactory  |                  |
| automatic_code_signing   | Configures Xcode's       | Multiple         |
| (DEPRECATED)             | Codesigning options      |                  |
| backup_file              | This action backs up     | gin0606          |
|                          | your file to             |                  |
|                          | "[path].back"            |                  |
| backup_xcarchive         | Save your [zipped]       | dral3x           |
|                          | xcarchive elsewhere      |                  |
|                          | from default path        |                  |
| badge (DEPRECATED)       | Automatically add a      | DanielGri        |
|                          | badge to your app icon   |                  |
| build_and_upload_to_app  | Generate and upload an   | KrauseFx         |
| etize                    | ipa file to appetize.io  |                  |
| build_android_app        | Alias for the `gradle`   | Multiple         |
|                          | action                   |                  |
| build_app                | Easily build and sign    | KrauseFx         |
|                          | your app (via _gym_)     |                  |
| build_ios_app            | Alias for the            | KrauseFx         |
|                          | `build_app` action but   |                  |
|                          | only for iOS             |                  |
| build_mac_app            | Alias for the            | KrauseFx         |
|                          | `build_app` action but   |                  |
|                          | only for macOS           |                  |
| bundle_install           | This action runs         | Multiple         |
|                          | `bundle install` (if     |                  |
|                          | available)               |                  |
| capture_android_screens  | Automated localized      | Multiple         |
| hots                     | screenshots of your      |                  |
|                          | Android app (via         |                  |
|                          | _screengrab_)            |                  |
| capture_ios_screenshots  | Generate new localized   | KrauseFx         |
|                          | screenshots on multiple  |                  |
|                          | devices (via             |                  |
|                          | _snapshot_)              |                  |
| capture_screenshots      | Alias for the            | KrauseFx         |
|                          | `capture_ios_screenshot  |                  |
|                          | s` action                |                  |
| carthage                 | Runs `carthage` for      | Multiple         |
|                          | your project             |                  |
| cert                     | Alias for the            | KrauseFx         |
|                          | `get_certificates`       |                  |
|                          | action                   |                  |
| changelog_from_git_comm  | Collect git commit       | Multiple         |
| its                      | messages into a          |                  |
|                          | changelog                |                  |
| chatwork                 | Send a success/error     | astronaughts     |
|                          | message to "ChatWork"    |                  |
|                          | (https://go.chatwork.co  |                  |
|                          | m/ 🔗)                   |                  |
| check_app_store_metadat  | Check your app's         | taquitos         |
| a                        | metadata before you      |                  |
|                          | submit your app to       |                  |
|                          | review (via _precheck_)  |                  |
| clean_build_artifacts    | Deletes files created    | lmirosevic       |
|                          | as result of running     |                  |
|                          | gym, cert, sigh or       |                  |
|                          | download_dsyms           |                  |
| clean_cocoapods_cache    | Remove the cache for     | alexmx           |
|                          | pods                     |                  |
| clear_derived_data       | Deletes the Xcode        | KrauseFx         |
|                          | Derived Data             |                  |
| clipboard                | Copies a given string    | Multiple         |
|                          | into the clipboard.      |                  |
|                          | Works only on macOS      |                  |
| cloc                     | Generates a Code Count   | intere           |
|                          | that can be read by      |                  |
|                          | Jenkins (xml format)     |                  |
| cocoapods                | Runs `pod install` for   | Multiple         |
|                          | the project              |                  |
| commit_github_file       | This will commit a file  | tommeier         |
|                          | directly on GitHub via   |                  |
|                          | the API                  |                  |
| commit_version_bump      | Creates a 'Version       | lmirosevic       |
|                          | Bump' commit. Run after  |                  |
|                          | `increment_build_number  |                  |
|                          | `                        |                  |
| copy_artifacts           | Copy and save your       | lmirosevic       |
|                          | build artifacts (useful  |                  |
|                          | when you use             |                  |
|                          | reset_git_repo)          |                  |
| crashlytics              | Refer to "Firebase App   | Multiple         |
| (DEPRECATED)             | Distribution"            |                  |
|                          | (https://appdistro.page  |                  |
|                          | .link/fastlane-repo 🔗)  |                  |
| create_app_on_managed_p  | Create Managed Google    | janpio           |
| lay_store                | Play Apps                |                  |
| create_app_online        | Creates the given        | KrauseFx         |
|                          | application on iTC and   |                  |
|                          | the Dev Portal (via      |                  |
|                          | _produce_)               |                  |
| create_keychain          | Create a new Keychain    | gin0606          |
| create_pull_request      | This will create a new   | Multiple         |
|                          | pull request on GitHub   |                  |
| danger                   | Runs `danger` for the    | KrauseFx         |
|                          | project                  |                  |
| debug                    | Print out an overview    | KrauseFx         |
|                          | of the lane context      |                  |
|                          | values                   |                  |
| default_platform         | Defines a default        | KrauseFx         |
|                          | platform to not have to  |                  |
|                          | specify the platform     |                  |
| delete_keychain          | Delete keychains and     | Multiple         |
|                          | remove them from the     |                  |
|                          | search list              |                  |
| deliver                  | Alias for the            | KrauseFx         |
|                          | `upload_to_app_store`    |                  |
|                          | action                   |                  |
| deploygate               | Upload a new build to    | Multiple         |
|                          | "DeployGate"             |                  |
|                          | (https://deploygate.com  |                  |
|                          | / 🔗)                    |                  |
| dotgpg_environment       | Reads in production      | simonlevy5       |
|                          | secrets set in a dotgpg  |                  |
|                          | file and puts them in    |                  |
|                          | ENV                      |                  |
| download                 | Download a file from a   | KrauseFx         |
|                          | remote server (e.g.      |                  |
|                          | JSON file)               |                  |
| download_dsyms           | Download dSYM files      | KrauseFx         |
|                          | from App Store Connect   |                  |
|                          | for Bitcode apps         |                  |
| download_from_play_stor  | Download metadata and    | janpio           |
| e                        | binaries from Google     |                  |
|                          | Play (via _supply_)      |                  |
| dsym_zip                 | Creates a zipped dSYM    | lmirosevic       |
|                          | in the project root      |                  |
|                          | from the .xcarchive      |                  |
| echo                     | Alias for the `puts`     | KrauseFx         |
|                          | action                   |                  |
| ensure_bundle_exec       | Raises an exception if   | rishabhtayal     |
|                          | not using `bundle exec`  |                  |
|                          | to run fastlane          |                  |
| ensure_env_vars          | Raises an exception if   | revolter         |
|                          | the specified env vars   |                  |
|                          | are not set              |                  |
| ensure_git_branch        | Raises an exception if   | Multiple         |
|                          | not on a specific git    |                  |
|                          | branch                   |                  |
| ensure_git_status_clean  | Raises an exception if   | Multiple         |
|                          | there are uncommitted    |                  |
|                          | git changes              |                  |
| ensure_no_debug_code     | Ensures the given text   | KrauseFx         |
|                          | is nowhere in the code   |                  |
|                          | base                     |                  |
| ensure_xcode_version     | Ensure the right         | Multiple         |
|                          | version of Xcode is      |                  |
|                          | used                     |                  |
| environment_variable     | Sets/gets env vars for   | taquitos         |
|                          | Fastlane.swift. Don't    |                  |
|                          | use in ruby, use         |                  |
|                          | `ENV[key] = val`         |                  |
| erb                      | Allows to Generate       | hjanuschka       |
|                          | output files based on    |                  |
|                          | ERB templates            |                  |
| fastlane_version         | Alias for the            | KrauseFx         |
|                          | `min_fastlane_version`   |                  |
|                          | action                   |                  |
| flock                    | Send a message to a      | Manav            |
|                          | "Flock"                  |                  |
|                          | (https://flock.com/ 🔗)  |                  |
|                          | group                    |                  |
| frame_screenshots        | Adds device frames       | KrauseFx         |
|                          | around all screenshots   |                  |
|                          | (via _frameit_)          |                  |
| frameit                  | Alias for the            | KrauseFx         |
|                          | `frame_screenshots`      |                  |
|                          | action                   |                  |
| gcovr                    | Runs test coverage       | dtrenz           |
|                          | reports for your Xcode   |                  |
|                          | project                  |                  |
| get_build_number         | Get the build number of  | Liquidsoul       |
|                          | your project             |                  |
| get_build_number_reposi  | Get the build number     | Multiple         |
| tory                     | from the current         |                  |
|                          | repository               |                  |
| get_certificates         | Create new iOS code      | KrauseFx         |
|                          | signing certificates     |                  |
|                          | (via _cert_)             |                  |
| get_github_release       | This will verify if a    | Multiple         |
|                          | given release version    |                  |
|                          | is available on GitHub   |                  |
| get_info_plist_value     | Returns value from       | kohtenko         |
|                          | Info.plist of your       |                  |
|                          | project as native Ruby   |                  |
|                          | data structures          |                  |
| get_ipa_info_plist_valu  | Returns a value from     | johnboiles       |
| e                        | Info.plist inside a      |                  |
|                          | .ipa file                |                  |
| get_managed_play_store_  | Obtain publishing        | janpio           |
| publishing_rights        | rights for custom apps   |                  |
|                          | on Managed Google Play   |                  |
|                          | Store                    |                  |
| get_provisioning_profil  | Generates a              | KrauseFx         |
| e                        | provisioning profile,    |                  |
|                          | saving it in the         |                  |
|                          | current folder (via      |                  |
|                          | _sigh_)                  |                  |
| get_push_certificate     | Ensure a valid push      | KrauseFx         |
|                          | profile is active,       |                  |
|                          | creating a new one if    |                  |
|                          | needed (via _pem_)       |                  |
| get_version_number       | Get the version number   | Multiple         |
|                          | of your project          |                  |
| git_add                  | Directly add the given   | Multiple         |
|                          | file or all files        |                  |
| git_branch               | Returns the name of the  | KrauseFx         |
|                          | current git branch,      |                  |
|                          | possibly as managed by   |                  |
|                          | CI ENV vars              |                  |
| git_commit               | Directly commit the      | KrauseFx         |
|                          | given file with the      |                  |
|                          | given message            |                  |
| git_pull                 | Executes a simple git    | Multiple         |
|                          | pull command             |                  |
| git_submodule_update     | Executes a git           | braunico         |
|                          | submodule command        |                  |
| git_tag_exists           | Checks if the git tag    | antondomashnev   |
|                          | with the given name      |                  |
|                          | exists in the current    |                  |
|                          | repo                     |                  |
| github_api               | Call a GitHub API        | tommeier         |
|                          | endpoint and get the     |                  |
|                          | resulting JSON response  |                  |
| google_play_track_versi  | Retrieves version codes  | panthomakos      |
| on_codes                 | for a Google Play track  |                  |
| gradle                   | All gradle related       | Multiple         |
|                          | actions, including       |                  |
|                          | building and testing     |                  |
|                          | your Android app         |                  |
| gym                      | Alias for the            | KrauseFx         |
|                          | `build_app` action       |                  |
| hg_add_tag               | This will add a hg tag   | sjrmanning       |
|                          | to the current branch    |                  |
| hg_commit_version_bump   | This will commit a       | sjrmanning       |
|                          | version bump to the hg   |                  |
|                          | repo                     |                  |
| hg_ensure_clean_status   | Raises an exception if   | sjrmanning       |
|                          | there are uncommitted    |                  |
|                          | hg changes               |                  |
| hg_push                  | This will push changes   | sjrmanning       |
|                          | to the remote hg         |                  |
|                          | repository               |                  |
| hipchat                  | Send a error/success     | jingx23          |
|                          | message to "HipChat"     |                  |
|                          | (https://www.hipchat.co  |                  |
|                          | m/ 🔗)                   |                  |
| hockey (DEPRECATED)      | Refer to "App Center"    | Multiple         |
|                          | (https://github.com/Mic  |                  |
|                          | rosoft/fastlane-plugin-  |                  |
|                          | appcenter/ 🔗)           |                  |
| ifttt                    | Connect to the "IFTTT    | vpolouchkine     |
|                          | Maker Channel"           |                  |
|                          | (https://ifttt.com/make  |                  |
|                          | r 🔗)                    |                  |
| import                   | Import another Fastfile  | KrauseFx         |
|                          | to use its lanes         |                  |
| import_certificate       | Import certificate from  | gin0606          |
|                          | inputfile into a         |                  |
|                          | keychain                 |                  |
| import_from_git          | Import another Fastfile  | Multiple         |
|                          | from a remote git        |                  |
|                          | repository to use its    |                  |
|                          | lanes                    |                  |
| increment_build_number   | Increment the build      | KrauseFx         |
|                          | number of your project   |                  |
| increment_version_numbe  | Increment the version    | serluca          |
| r                        | number of your project   |                  |
| install_on_device        | Installs an .ipa file    | hjanuschka       |
|                          | on a connected           |                  |
|                          | iOS-device via usb or    |                  |
|                          | wifi                     |                  |
| install_provisioning_pr  | Install provisioning     | SofteqDG         |
| ofile                    | profile from path        |                  |
| install_xcode_plugin     | Install an Xcode plugin  | Multiple         |
|                          | for the current user     |                  |
| installr                 | Upload a new build to    | scottrhoyt       |
|                          | "Installr"               |                  |
|                          | (http://installrapp.com  |                  |
|                          | / 🔗)                    |                  |
| ipa (DEPRECATED)         | Easily build and sign    | joshdholtz       |
|                          | your app using shenzhen  |                  |
| is_ci                    | Is the current run       | KrauseFx         |
|                          | being executed on a CI   |                  |
|                          | system, like Jenkins or  |                  |
|                          | Travis                   |                  |
| jazzy                    | Generate docs using      | KrauseFx         |
|                          | Jazzy                    |                  |
| jira                     | Leave a comment on JIRA  | iAmChrisTruman   |
|                          | tickets                  |                  |
| lane_context             | Access lane context      | KrauseFx         |
|                          | values                   |                  |
| last_git_commit          | Return last git commit   | ngutman          |
|                          | hash, abbreviated        |                  |
|                          | commit hash, commit      |                  |
|                          | message and author       |                  |
| last_git_tag             | Get the most recent git  | Multiple         |
|                          | tag                      |                  |
| latest_testflight_build  | Fetches most recent      | daveanderson     |
| _number                  | build number from        |                  |
|                          | TestFlight               |                  |
| lcov                     | Generates coverage data  | thiagolioy       |
|                          | using lcov               |                  |
| mailgun                  | Send a success/error     | thiagolioy       |
|                          | message to an email      |                  |
|                          | group                    |                  |
| make_changelog_from_jen  | Generate a changelog     | mandrizzle       |
| kins                     | using the Changes        |                  |
|                          | section from the         |                  |
|                          | current Jenkins build    |                  |
| match                    | Alias for the            | KrauseFx         |
|                          | `sync_code_signing`      |                  |
|                          | action                   |                  |
| min_fastlane_version     | Verifies the minimum     | KrauseFx         |
|                          | fastlane version         |                  |
|                          | required                 |                  |
| modify_services          | Modifies the services    | bhimsenpadalkar  |
|                          | of the app created on    |                  |
|                          | Developer Portal         |                  |
| nexus_upload             | Upload a file to         | Multiple         |
|                          | "Sonatype Nexus          |                  |
|                          | platform"                |                  |
|                          | (https://www.sonatype.c  |                  |
|                          | om 🔗)                   |                  |
| notarize                 | Notarizes a macOS app    | zeplin           |
| notification             | Display a macOS          | Multiple         |
|                          | notification with        |                  |
|                          | custom message and       |                  |
|                          | title                    |                  |
| notify (DEPRECATED)      | Shows a macOS            | Multiple         |
|                          | notification - use       |                  |
|                          | `notification` instead   |                  |
| number_of_commits        | Return the number of     | Multiple         |
|                          | commits in current git   |                  |
|                          | branch                   |                  |
| oclint                   | Lints implementation     | HeEAaD           |
|                          | files with OCLint        |                  |
| onesignal                | Create or update a new   | Multiple         |
|                          | "OneSignal"              |                  |
|                          | (https://onesignal.com/  |                  |
|                          | 🔗) application          |                  |
| opt_out_crash_reporting  | This will prevent        | Multiple         |
| (DEPRECATED)             | reports from being       |                  |
|                          | uploaded when            |                  |
|                          | _fastlane_ crashes       |                  |
| opt_out_usage            | This will stop           | KrauseFx         |
|                          | uploading the            |                  |
|                          | information which        |                  |
|                          | actions were run         |                  |
| pem                      | Alias for the            | KrauseFx         |
|                          | `get_push_certificate`   |                  |
|                          | action                   |                  |
| pilot                    | Alias for the            | KrauseFx         |
|                          | `upload_to_testflight`   |                  |
|                          | action                   |                  |
| pod_lib_lint             | Pod lib lint             | thierryxing      |
| pod_push                 | Push a Podspec to Trunk  | squarefrog       |
|                          | or a private repository  |                  |
| podio_item               | Creates or updates an    | Multiple         |
|                          | item within your Podio   |                  |
|                          | app                      |                  |
| precheck                 | Alias for the            | taquitos         |
|                          | `check_app_store_metada  |                  |
|                          | ta` action               |                  |
| println                  | Alias for the `puts`     | KrauseFx         |
|                          | action                   |                  |
| produce                  | Alias for the            | KrauseFx         |
|                          | `create_app_online`      |                  |
|                          | action                   |                  |
| prompt                   | Ask the user for a       | KrauseFx         |
|                          | value or for             |                  |
|                          | confirmation             |                  |
| push_git_tags            | Push local tags to the   | vittoriom        |
|                          | remote - this will only  |                  |
|                          | push tags                |                  |
| push_to_git_remote       | Push local changes to    | lmirosevic       |
|                          | the remote branch        |                  |
| puts                     | Prints out the given     | KrauseFx         |
|                          | text                     |                  |
| read_podspec             | Loads a CocoaPods spec   | czechboy0        |
|                          | as JSON                  |                  |
| recreate_schemes         | Recreate not shared      | jerolimov        |
|                          | Xcode project schemes    |                  |
| register_device          | Registers a new device   | pvinis           |
|                          | to the Apple Dev Portal  |                  |
| register_devices         | Registers new devices    | lmirosevic       |
|                          | to the Apple Dev Portal  |                  |
| reset_git_repo           | Resets git repo to a     | lmirosevic       |
|                          | clean state by           |                  |
|                          | discarding uncommitted   |                  |
|                          | changes                  |                  |
| reset_simulator_content  | Shutdown and reset       | danramteke       |
| s                        | running simulators       |                  |
| resign                   | Codesign an existing     | lmirosevic       |
|                          | ipa file                 |                  |
| restore_file             | This action restore      | gin0606          |
|                          | your file that was       |                  |
|                          | backuped with the        |                  |
|                          | `backup_file` action     |                  |
| rocket                   | Outputs ascii-art for a  | Multiple         |
|                          | rocket 🚀                |                  |
| rsync                    | Rsync files from         | hjanuschka       |
|                          | :source to :destination  |                  |
| ruby_version             | Verifies the minimum     | sebastianvarela  |
|                          | ruby version required    |                  |
| run_tests                | Easily run tests of      | KrauseFx         |
|                          | your iOS app (via        |                  |
|                          | _scan_)                  |                  |
| s3 (DEPRECATED)          | Generates a plist file   | joshdholtz       |
|                          | and uploads all to AWS   |                  |
|                          | S3                       |                  |
| say                      | This action speaks the   | KrauseFx         |
|                          | given text out loud      |                  |
| scan                     | Alias for the            | KrauseFx         |
|                          | `run_tests` action       |                  |
| scp                      | Transfer files via SCP   | hjanuschka       |
| screengrab               | Alias for the            | Multiple         |
|                          | `capture_android_screen  |                  |
|                          | shots` action            |                  |
| set_build_number_reposi  | Set the build number     | Multiple         |
| tory                     | from the current         |                  |
|                          | repository               |                  |
| set_changelog            | Set the changelog for    | KrauseFx         |
|                          | all languages on App     |                  |
|                          | Store Connect            |                  |
| set_github_release       | This will create a new   | Multiple         |
|                          | release on GitHub and    |                  |
|                          | upload assets for it     |                  |
| set_info_plist_value     | Sets value to            | Multiple         |
|                          | Info.plist of your       |                  |
|                          | project as native Ruby   |                  |
|                          | data structures          |                  |
| set_pod_key              | Sets a value for a key   | marcelofabri     |
|                          | with cocoapods-keys      |                  |
| setup_ci                 | Setup the keychain and   | Multiple         |
|                          | match to work with CI    |                  |
| setup_circle_ci          | Setup the keychain and   | dantoml          |
|                          | match to work with       |                  |
|                          | CircleCI                 |                  |
| setup_jenkins            | Setup xcodebuild, gym    | bartoszj         |
|                          | and scan for easier      |                  |
|                          | Jenkins integration      |                  |
| setup_travis             | Setup the keychain and   | KrauseFx         |
|                          | match to work with       |                  |
|                          | Travis CI                |                  |
| sh                       | Runs a shell command     | KrauseFx         |
| sigh                     | Alias for the            | KrauseFx         |
|                          | `get_provisioning_profi  |                  |
|                          | le` action               |                  |
| skip_docs                | Skip the creation of     | KrauseFx         |
|                          | the fastlane/README.md   |                  |
|                          | file when running        |                  |
|                          | fastlane                 |                  |
| slack                    | Send a success/error     | KrauseFx         |
|                          | message to your "Slack"  |                  |
|                          | (https://slack.com 🔗)   |                  |
|                          | group                    |                  |
| slather                  | Use slather to generate  | mattdelves       |
|                          | a code coverage report   |                  |
| snapshot                 | Alias for the            | KrauseFx         |
|                          | `capture_ios_screenshot  |                  |
|                          | s` action                |                  |
| sonar                    | Invokes sonar-scanner    | c_gretzki        |
|                          | to programmatically run  |                  |
|                          | SonarQube analysis       |                  |
| spaceship_logs           | Find, print, and copy    | joshdholtz       |
|                          | Spaceship logs           |                  |
| splunkmint               | Upload dSYM file to      | xfreebird        |
|                          | "Splunk MINT"            |                  |
|                          | (https://mint.splunk.co  |                  |
|                          | m/ 🔗)                   |                  |
| spm                      | Runs Swift Package       | Multiple         |
|                          | Manager on your project  |                  |
| ssh                      | Allows remote command    | hjanuschka       |
|                          | execution using ssh      |                  |
| supply                   | Alias for the            | KrauseFx         |
|                          | `upload_to_play_store`   |                  |
|                          | action                   |                  |
| swiftlint                | Run swift code           | KrauseFx         |
|                          | validation using         |                  |
|                          | SwiftLint                |                  |
| sync_code_signing        | Easily sync your         | KrauseFx         |
|                          | certificates and         |                  |
|                          | profiles across your     |                  |
|                          | team (via _match_)       |                  |
| team_id                  | Specify the Team ID you  | KrauseFx         |
|                          | want to use for the      |                  |
|                          | Apple Developer Portal   |                  |
| team_name                | Set a team to use by     | KrauseFx         |
|                          | its name                 |                  |
| testfairy                | Upload a new build to    | Multiple         |
|                          | "TestFairy"              |                  |
|                          | (https://www.testfairy.  |                  |
|                          | com/ 🔗)                 |                  |
| testflight               | Alias for the            | KrauseFx         |
|                          | `upload_to_testflight`   |                  |
|                          | action                   |                  |
| tryouts                  | Upload a new build to    | alicertel        |
|                          | "Tryouts"                |                  |
|                          | (https://tryouts.io/ 🔗) |                  |
| twitter                  | Post a tweet on          | hjanuschka       |
|                          | "Twitter.com"            |                  |
|                          | (https://twitter.com 🔗) |                  |
| typetalk                 | Post a message to        | Nulab Inc.       |
|                          | "Typetalk"               |                  |
|                          | (https://www.typetalk.c  |                  |
|                          | om/ 🔗)                  |                  |
| unlock_keychain          | Unlock a keychain        | xfreebird        |
| update_app_group_identi  | This action changes the  | mathiasAichinger |
| fiers                    | app group identifiers    |                  |
|                          | in the entitlements      |                  |
|                          | file                     |                  |
| update_app_identifier    | Update the project's     | Multiple         |
|                          | bundle identifier        |                  |
| update_code_signing_set  | Configures Xcode's       | Multiple         |
| tings                    | Codesigning options      |                  |
| update_fastlane          | Makes sure               | Multiple         |
|                          | fastlane-tools are       |                  |
|                          | up-to-date when running  |                  |
|                          | fastlane                 |                  |
| update_icloud_container  | This action changes the  | JamesKuang       |
| _identifiers             | iCloud container         |                  |
|                          | identifiers in the       |                  |
|                          | entitlements file        |                  |
| update_info_plist        | Update a Info.plist      | tobiasstrebitzer |
|                          | file with bundle         |                  |
|                          | identifier and display   |                  |
|                          | name                     |                  |
| update_keychain_access_  | This action changes the  | yutae            |
| groups                   | keychain access groups   |                  |
|                          | in the entitlements      |                  |
|                          | file                     |                  |
| update_plist             | Update a plist file      | Multiple         |
| update_project_code_sig  | Updated code signing     | KrauseFx         |
| ning (DEPRECATED)        | settings from            |                  |
|                          | 'Automatic' to a         |                  |
|                          | specific profile         |                  |
| update_project_provisio  | Update projects code     | Multiple         |
| ning                     | signing settings from    |                  |
|                          | your provisioning        |                  |
|                          | profile                  |                  |
| update_project_team      | Update Xcode             | lgaches          |
|                          | Development Team ID      |                  |
| update_urban_airship_co  | Set "Urban Airship"      | kcharwood        |
| nfiguration              | (https://www.urbanairsh  |                  |
|                          | ip.com/ 🔗) plist        |                  |
|                          | configuration values     |                  |
| update_url_schemes       | Updates the URL schemes  | kmikael          |
|                          | in the given Info.plist  |                  |
| upload_symbols_to_crash  | Upload dSYM              | KrauseFx         |
| lytics                   | symbolication files to   |                  |
|                          | Crashlytics              |                  |
| upload_symbols_to_sentr  | Upload dSYM              | joshdholtz       |
| y (DEPRECATED)           | symbolication files to   |                  |
|                          | Sentry                   |                  |
| upload_to_app_store      | Upload metadata and      | KrauseFx         |
|                          | binary to App Store      |                  |
|                          | Connect (via _deliver_)  |                  |
| upload_to_play_store     | Upload metadata,         | KrauseFx         |
|                          | screenshots and          |                  |
|                          | binaries to Google Play  |                  |
|                          | (via _supply_)           |                  |
| upload_to_play_store_in  | Upload binaries to       | andrewhavens     |
| ternal_app_sharing       | Google Play Internal     |                  |
|                          | App Sharing (via         |                  |
|                          | _supply_)                |                  |
| upload_to_testflight     | Upload new binary to     | KrauseFx         |
|                          | App Store Connect for    |                  |
|                          | TestFlight beta testing  |                  |
|                          | (via _pilot_)            |                  |
| validate_play_store_jso  | Validate that the        | janpio           |
| n_key                    | Google Play Store        |                  |
|                          | `json_key` works         |                  |
| verify_build             | Able to verify various   | CodeReaper       |
|                          | settings in ipa file     |                  |
| verify_pod_keys          | Verifies all keys        | ashfurrow        |
|                          | referenced from the      |                  |
|                          | Podfile are non-empty    |                  |
| verify_xcode             | Verifies that the Xcode  | KrauseFx         |
|                          | installation is          |                  |
|                          | properly signed by       |                  |
|                          | Apple                    |                  |
| version_bump_podspec     | Increment or set the     | Multiple         |
|                          | version in a podspec     |                  |
|                          | file                     |                  |
| version_get_podspec      | Receive the version      | Multiple         |
|                          | number from a podspec    |                  |
|                          | file                     |                  |
| xcarchive                | Archives the project     | dtrenz           |
|                          | using `xcodebuild`       |                  |
| xcbuild                  | Builds the project       | dtrenz           |
|                          | using `xcodebuild`       |                  |
| xcclean                  | Cleans the project       | dtrenz           |
|                          | using `xcodebuild`       |                  |
| xcexport                 | Exports the project      | dtrenz           |
|                          | using `xcodebuild`       |                  |
| xcode_install            | Make sure a certain      | Krausefx         |
|                          | version of Xcode is      |                  |
|                          | installed                |                  |
| xcode_select             | Change the xcode-path    | dtrenz           |
|                          | to use. Useful for beta  |                  |
|                          | versions of Xcode        |                  |
| xcode_server_get_assets  | Downloads Xcode Bot      | czechboy0        |
|                          | assets like the          |                  |
|                          | `.xcarchive` and logs    |                  |
| xcodebuild               | Use the `xcodebuild`     | dtrenz           |
|                          | command to build and     |                  |
|                          | sign your app            |                  |
| xcov                     | Nice code coverage       | nakiostudio      |
|                          | reports without hassle   |                  |
| xctest                   | Runs tests on the given  | dtrenz           |
|                          | simulator                |                  |
| xctool                   | Run tests using xctool   | KrauseFx         |
| xcversion                | Select an Xcode to use   | oysta            |
|                          | by version specifier     |                  |
| zip                      | Compress a file or       | KrauseFx         |
|                          | folder to a zip          |                  |
+--------------------------+--------------------------+------------------+
  Total of 227 actions

Get more information for one specific action using `fastlane action [name]`

查看某个action的具体参数: fastlane action [action名称],如: fastlane action zip

3. 项目中使用fastlane

  1. fastlane init会创建fastlane文件夹;
[✔] 🚀 
[✔] Looking for iOS and Android projects in current directory...
[09:55:59]: Created new folder './fastlane'.
[09:55:59]: Detected an iOS/macOS project in the current directory: 'TargetAct.xcodeproj'
[09:55:59]: -----------------------------
[09:55:59]: --- Welcome to fastlane 🚀 ---
[09:55:59]: -----------------------------
[09:55:59]: fastlane can help you with all kinds of automation for your mobile app
[09:55:59]: We recommend automating one task first, and then gradually automating more over time
[09:55:59]: What would you like to use fastlane for?
1. 📸  Automate screenshots
2. 👩‍✈️  Automate beta distribution to TestFlight
3. 🚀  Automate App Store distribution
4. 🛠  Manual setup - manually setup your project to automate your tasks
?  

会让你做需求选择:

  1. 📸 Automate screenshots. // 自动化截图
  2. 👩‍✈️ Automate beta distribution to TestFlight. // 自动发布测试版到TestFlight
  3. 🚀 Automate App Store distribution. //自动化发布应用程序商店
  4. 🛠 Manual setup - manually setup your project to automate your tasks //手工设置,手动设置您的项目自动化任务

然后会有一些选项和输入项(AppId账号密码),按需输入即可,会进行一些相关的初始化;选择2

完成后项目根目录会生成一个fastlane文件夹,其中至少含有Appfile,Fastfile两个关键文件:
Appfile:记录你的项目,账号等关键信息,如包名,Apple ID,Team ID等
Fastfile:关键的操作文件。根据你自己的需求,在其中定制自己的操作流

# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:ios)

platform :ios do
  desc "Push a new beta build to TestFlight"
  lane :beta do
    build_app(scheme: "TargetAct")
    upload_to_testflight
  end
end

fastlane的主要使用就是需要根据自己的需求定制自己的lane,lane里面加入各种各样的action即可;

然后自己玩一下:

fastlane [lane名称],如:
fastlane beta

相关文章

网友评论

      本文标题:Fastlane集成

      本文链接:https://www.haomeiwen.com/subject/khmlvhtx.html