我正在使用fastlane,像https://docs.fastlane.tools/getting-started/ios/setup/ docs一样。但无法正确设置。
请指导我。
在研发上花了足够的时间后,我找到了安装快速通道的正确方法。
我在这里发布一些命令。只需将其粘贴在终端上即可
1:卷曲-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安装gnupg
4:RVM安装 - > gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113XXXXXXXXXXX 7D2BAF1CF37B13E2069XXXXXXXXXXXXXX
5:source /Users/bedi/.rvm/scripts/rvm
6:curl -sSL https://get.rvm.io | bash -s stable --ruby
7:宝石安装fastlane
8:brew list [email protected]
9:ln -s /usr/local/Cellar/[email protected]/1.1.0f/bin/openssl / usr / local / bin / openssl
就是现在你有一个完全预先设定的快速通道设置。现在您可以根据目标操作系统进行设置。
1)https://docs.fastlane.tools/getting-started/ios/setup/
2)https://docs.fastlane.tools/getting-started/android/setup/
Fastlane是一系列工具,用于自动构建和发布iOS和Android应用程序。如果您之前尝试将应用程序交付给TestFlight或Apple Store,您就知道该过程需要多长时间:归档应用程序,将其导出到AppleStore,添加新版本(在无限处理时间之后),为每个设备添加屏幕截图,跳过几个箍,最后,让它可供你的测试人员或世界使用。首先,我们将安装和设置fastlane。假设您在Mac上,请打开终端并运行以下每个命令:
安装Fastlane后,您可以根据需要添加不同的工具。这是 list of fastlane commands from github:
创建xcode项目后,转到其文件夹并运行fastlane init。该脚本将提示您输入苹果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:
fastlane actions
commandfastlane
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(
)
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
结束