无法为iOS和android设置fastlane?

时间:2019-02-21 07:06:34

标签: android ios automation fastlane

我正在使用Fastlane,作为https://docs.fastlane.tools/getting-started/ios/setup/文档来使用。 但无法正确设置。

请指导我。

2 个答案:

答案 0 :(得分:1)

花了足够的时间进行研发后,我找到了安装快速通道的正确方法。

我在这里发布一些命令。只需将其一一粘贴在您的终端上

1:curl -L https://get.rvm.io | bash -s stable --auto-dotfiles --autolibs = enable —rails

2:GPG安装-> ruby​​ -e“ $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

3:brew install gnupg

4:RVM安装-> gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113XXXXXXXXXXX 7D2BAF1CF37B13E2069XXXXXXXXXXXXXX

5:源/Users/bedi/.rvm/scripts/rvm

6:curl -sSL https://get.rvm.io | bash -s稳定--ruby

7:gem安装快速通道

8:酿造清单openssl@1.1

9:ln -s /usr/local/Cellar/openssl@1.1/1.1.0f/bin/openssl / usr / local / bin / openssl

就是这样,现在您已经为Fastlane设置了完全的预申报设置。 现在,您可以根据目标操作系统进行设置。

1)https://docs.fastlane.tools/getting-started/ios/setup/

2)https://docs.fastlane.tools/getting-started/android/setup/

答案 1 :(得分:0)

Fastlane是用于自动构建和发布iOS和Android应用程序的工具的集合。如果您之前曾尝试将应用程序交付到TestFlight或Apple Store,则您知道过程需要多长时间:将应用程序存档,将其导出到AppleStore,添加新版本(在无限的处理时间之后),为每个设备添加屏幕截图,然后再跳几圈,最终将其提供给您的测试人员或全世界。首先,我们将安装和设置fastlane。假设您使用的是Mac,请打开终端并运行以下每个命令:

  1. sudo gem install fastlane --verbose然后 2.xcode-select --install //这将从xCode弹出一些动作 3.清理宝石

一旦安装了Fastlane,就可以根据需要添加其他工具。这是 list of fastlane commands from github:

一旦创建了xcode项目,请转到其文件夹并运行fastlane init。该脚本将提示您输入Apple ID /密码,应用程序标识符,方案,并在iTunes Connect和Apple Developer Port上创建应用程序(如有必要),并将所有这些信息存储在fastlane / Appfile和fastlane / Deliverfile中。 Once everything is correctly set up, you should see something like that: Fastlane然后将在Fastfile内创建一个名为fastlane的文件夹,该文件是ruby配置脚本。这是一个示例文件:

# Customise this file, documentation can be found here:

https://github.com/fastlane/fastlane/tree/master/fastlane/docs

所有可用操作:https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md

也可以使用fastlane actions命令列出

将语法突出显示更改为Ruby

运行fastlane时,所有以#开头的行都会被忽略

如果要在新版本可用时自动更新快速通道:

update_fastlane

这是所需的最低版本号。

如果使用较新版本的功能,请进行更新

fastlane_version“ 1.89.0”

default_platform:ios

平台:ios do     before_all做         #test#设置正确的网址,向下滚动到第3部分         ENV [“ SLACK_URL”] || =“ https://hooks.slack.com/services/xxxxxxx

    # URL for Project #ios channel
    #ENV["SLACK_URL"] ||= "https://hooks.slack.com/services/xxxx"
    slack(message:"New version recieved, processing started")
end

after_all do |lane|
    # This block is called, only if the executed lane was successful

    # slack(
    #   message: "New App Update successfully deployed."
    # )
end

error do |lane, exception|
    slack(
        message: exception.message,
        success: false
    )
end

#lane to run unit tests
desc "[TEST] Runs all the tests"
lane :unittest do
    scan
end

#lane to send app to testflight
desc "[TESTFLIGHT] publish production"
    lane :tf_production do
    apple_testflight(scheme: "YOUR_SCHEME_NAME")
end

desc "[STORE] Deploy a new version"
lane :app_store do
    # match(type: "appstore")
    # snapshot
    build(scheme:"YOUR_SCHEME_NAME")
    deliver(force: true)
    # frameit
end

desc "[PRIVATE] Deploy a new version to the Testflight"
private_lane :apple_testflight do |options|

    scheme = options[:scheme]
    slack(message: "Starting processing "+scheme+" for Testflight")
    cert
    sigh
    #TODO: fix "increment_build_number" to bump ONLY the build number or the selected scheme 
    # increment_build_number
    build(scheme: scheme)
    resign(signing_identity:'#Name of the certificate as shown in the Keychain, for ex: iPhone Distribution: My COMPANY (XXXXXXXX)')
    pilot(

distribute_external:否,

testers_file_path:“。/external_testers.csv”

    )
    slack(message: "Processing finished")
end

desc "[PRIVATE] Build usign schema"
private_lane :build do |options|
    scheme = options[:scheme]
    cocoapods
    gym(
        scheme: scheme,
        codesigning_identity: '#Name of the certificate as shown in the Keychain, for ex: iPhone Distribution: My COMPANY (XXXXXXXX)'
    )
end

结束

有关Fastlane中多个平台的更多信息:https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md

所有可用操作:https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md

fastlane报告使用了哪些操作

未记录任何个人数据。在https://github.com/fastlane/enhancer

了解更多信息