Travis CI抛出firebase_cli_path。我不确定如何指定此路径。在Google文档中,它提到此路径将自动检测。好吧,那我需要将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: "[email protected]",
release_notes: "Configuring Fastlane",
firebase_cli_token:ENV["FIREBASE_TOKEN"]
)
end
end
我已经弄清楚了,它现在正在工作。只是包含了在Travis中安装独立firebase工具的脚本。Check this并添加此
curl -sL firebase.tools | bash
在您的travis.yml文件中。
Sample 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”