CocoaPods在pod trunk推送时验证pod规范(CocoaPods Validating pod spec while pod trunk push)

编程入门 行业动态 更新时间:2024-10-26 20:22:07
CocoaPods在pod trunk推送时验证pod规范(CocoaPods Validating pod spec while pod trunk push)

我正在尝试使用pod trunk push command为我的名为DKProgressHUD存储库推送一个新的PodSpec 。 它告诉我,我的图像无效。 所以,我有两个问题。 trunk是否已经可用于推送。 我的形象出了什么问题?

~/Documents/Github/DKProgressHUD: $ pod trunk push ./DKProgressHUD.podspec Validating podspec -> DKProgressHUD (1.0.1) - WARN | The screenshot https://github.com/wzbozon/DKProgressHUD/blob/master/Screenshot.png is not a valid image. [!] The podspec does not validate.

这是图像:

链接到GitHub / DKProgressHUD 。

I am trying to push a new PodSpec for my repository called DKProgressHUD using pod trunk push command. It tells, that my image is invalid. So, I have two questions. Does trunk already available for pushes. What is wrong with my image?

~/Documents/Github/DKProgressHUD: $ pod trunk push ./DKProgressHUD.podspec Validating podspec -> DKProgressHUD (1.0.1) - WARN | The screenshot https://github.com/wzbozon/DKProgressHUD/blob/master/Screenshot.png is not a valid image. [!] The podspec does not validate.

This is image:

Link to GitHub/DKProgressHUD.

最满意答案

这里的问题很可能是链接不是图像本身的链接,而是关于图像的Github页面。

使用原始图像应该有所帮助: https : //raw.githubusercontent.com/wzbozon/DKProgressHUD/master/Screenshot.png

以下是引发错误的代码的摘录:

def validate_screenshots(spec) spec.screenshots.compact.each do |screenshot| request = validate_url(screenshot) if request && !(request.headers['content-type'] && request.headers['content-type'].first =~ /image\/.*/i) warning "The screenshot #{screenshot} is not a valid image." end end end

我希望这有帮助。 干杯!

The issue here is most likely that the link is not a link to the image itself, but to a Github page about the image.

Using the raw image should help: https://raw.githubusercontent.com/wzbozon/DKProgressHUD/master/Screenshot.png

Here is an excerpt of the code that raises the error:

def validate_screenshots(spec) spec.screenshots.compact.each do |screenshot| request = validate_url(screenshot) if request && !(request.headers['content-type'] && request.headers['content-type'].first =~ /image\/.*/i) warning "The screenshot #{screenshot} is not a valid image." end end end

I hope this helps. Cheers!

更多推荐

本文发布于:2023-07-29 20:45:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1319603.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:trunk   pod   CocoaPods   push   spec

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!