1

Travis CI 抛出 firebase_cli_path。我不确定如何指定此路径。在谷歌文档中,它提到这个路径会自动检测。那么,我需要将 firebase 工具安装到 Travis CI 中,我该怎么做?

这是 travis.yml

dist: trusty

branches:
  only:
    - master


before_install:
  - gem install bundler
  - bundle --version
  - bundle install

android:
  components:
    # Uncomment the lines below if you want to
    # use the latest revision of Android SDK Tools
    # - tools
    # - platform-tools

    # The BuildTools version used by your project
    - build-tools-28.0.3

    # The SDK version used to compile your project
    - android-28

    # Additional components
    - extra-google-google_play_services
    - extra-google-m2repository
    - extra-android-m2repository

    # Specify at least one system image,
    # if you need to run emulator(s) during your tests
    - sys-img-x86-android-26
    - sys-img-armeabi-v7a-android-17

script:
 - bundle exec fastlane android uatrelease

after_success:
 - firebase deploy --token $FIREBASE_TOKEN --non-interactive

这是快速文件

default_platform(:android)


platform :android do
  desc "Runs all the tests"
  lane :test do
    gradle(task: "test")
  end

  desc "Submit a new Beta Build to Hockey App"
  lane :beta do |options|
    gradle(task: "clean assembleRelease")

    firebase_app_distribution(
                           app: "1:***********************",
                           testers: "abc@gmail.com",
                           release_notes: "Configuring Fastlane",
                           firebase_cli_token:ENV["FIREBASE_TOKEN"]
                       )

end
end

4

1 回答 1

2

我已经想通了,它现在正在工作。刚刚包含在 Travis 中安装独立 firebase 工具的脚本。 检查这个并添加这个

curl -sL firebase.tools | 重击

在你的 travis.yml 文件中。

示例 travis.yml

dist: trusty

branches:
  only:
    - master


before_install:
  - gem install bundler
  - bundle --version
  - bundle install

before_script:
  - curl -sL firebase.tools | bash

android:
  components:
    # Uncomment the lines below if you want to
    # use the latest revision of Android SDK Tools
    # - tools
    # - platform-tools

    # The BuildTools version used by your project
    - build-tools-28.0.3

    # The SDK version used to compile your project
    - android-28

    # Additional components
    - extra-google-google_play_services
    - extra-google-m2repository
    - extra-android-m2repository

    # Specify at least one system image,
    # if you need to run emulator(s) during your tests
    - sys-img-x86-android-26
    - sys-img-armeabi-v7a-android-17

script:
 - bundle exec fastlane “your action”
于 2020-03-10T05:19:08.877 回答