CocoaPods spec lint 警告处理 source: The version should be included in the Git tag

制作CocoaPods的specs文件时出现warning。

source: The version should be included in the Git tag.

网上查了一下 ,是因为下面这两行 的 版本数字不一致导致的

s.version          = "0.1.0"

s.source           = { :git => "http://gitlab...git", :tag => '0.1.1' }

CocoaPods验证spec文件时会匹配git地址的tag和配置的spec文件中的version,如果二者不比配,CocoaPods判断版本有可能不一致,就会显示这样一句warning。将spec文件中的s.version改成和tag改成一样的数字之后,这个warning顺利地被解决了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章