我正在尝试使用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 endI hope this helps. Cheers!
更多推荐
发布评论