HTML5   发布时间:2022-04-27  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了ios – FastLanes.在Xcode项目根文件夹中运行sh动作大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
在以下Fastfile上运行fastlane build_and_rename,

lane :build_and_rename do
    sigh
    gym(output_directory: "./Build/")
    sh "mv ./Build/MY-APP.ipa ./Build/nicely_name.ipa"
  end

导致以下错误:./Build/MY-APP.ipa:没有这样的文件或目录.

测试显示FastLane的sh动作在./fastlane目录中运行.示例,fastlane test_sh用于以下Fastfile

lane :test_sh do
    sh "touch where_am_i.txt"
  end

导致在./fastlane文件夹中创建where_am_i.txt.不在运行fastlane的文件夹中.

显然我可以更改所有脚本以包含../但是想知道是否有办法在xCode的根项目中使用fastlane run sh动作?

解决方法

事实证明这很简单,只需添加cd ..&&要更改到根目录.

lane :test_sh do
    sh "cd .. && touch where_am_i.txt"
end

https://github.com/fastlane/fastlane/issues/990#issuecomment

大佬总结

以上是大佬教程为你收集整理的ios – FastLanes.在Xcode项目根文件夹中运行sh动作全部内容,希望文章能够帮你解决ios – FastLanes.在Xcode项目根文件夹中运行sh动作所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。