首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用Fastlane发送Codacy代码覆盖率

用Fastlane发送Codacy代码覆盖率
EN

Stack Overflow用户
提问于 2020-04-05 23:56:09
回答 1查看 224关注 0票数 0

我正在尝试发送代码覆盖率报告,该报告是由Slather to Codacy使用Fastlane创建的。这是一条小路:

代码语言:javascript
复制
  desc "Do A Slather and send to Codacy"
  lane :code_coverage do |options|
    slather(output_directory: "SlatherReports", scheme: "MyApp", configuration: "Debug", workspace: "MyApp.xcworkspace", proj: "MyApp.xcodeproj", cobertura_xml: true, use_bundle_exec: true)
    ENV["CODACY_PROJECT_TOKEN"] = options[:codacy_token]
    sh "bash <(curl -Ls https://coverage.codacy.com/get.sh -r SlatherReports/cobertura.xml)"
  end

“奴隶”运行,但bash脚本没有工作。它返回了以下错误:

06:40:19:命令'bash <(curl -Ls https://coverage.codacy.com/get.sh -r SlatherReports/cobertura.xml)的退出状态为2而不是0。sh:-c:第0行:接近意外令牌的语法错误(' sh: -c: line 0:bash <(curl -Ls https://coverage.codacy.com/get.sh -r SlatherReports/cobertura.xml)‘

那我该怎么解决这个问题?谢谢。

EN

回答 1

Stack Overflow用户

发布于 2020-04-07 00:53:54

我自己找到答案了。这是一个非常简单的问题(为什么我之前没有想到这一点?)我只是将整个bash <(curl -Ls https://coverage.codacy.com/get.sh -r SlatherReports/cobertura.xml)行放入一个不同的bash脚本文件中,然后调用它。LOL。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61051044

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档