pod trunk 发布程序

2018-01-11  本文已影响0人  Billlin

pod trunk 发布流程


首先如果还没有注册trunk,需要先注册trunk。

pod trunk register xxx@163.com xxx --description='xxx' macbookpro' --verbose

xxx@163.com:邮箱 xxx:用户名 xxx' macbookpro:描述

接下来会收到一封邮件,点击邮件中的链接进行激活。

pod trunk me

  - Name:     xxx
  - Email:    xxx@163.com
  - Since:    January 2nd, 21:00
  - Pods:     None
  - Sessions:

pod spec create TestPodTrunk

Pod::Spec.new do |s|
  s.name         = "TestPodTrunk"
  s.version      = "0.0.1"
  s.summary      = "this is test pod trunk"
  s.homepage     = "https://github.com/xxx/TestPodTrunk"
  s.license      = "MIT"
  s.author       = { "xxx" => "xxx@163.com" }
  s.source       = { :git => "https://github.com/xxx/TestPodTrunk.git", :tag => '0.0.1' }
  s.source_files = "TestPodTrunk/Test"
  s.requires_arc = true
  s.platform        = :ios
end

这一步可使用git命名行也可使用工具,最重要的是tag,因为CocoaPods是根据tag来分析的!

pod spec lint TestPodTrunk.podspec --allow-warnings

提示:这一步也可以不用做,因为提交到CocoaPods trunk的时候首先也会验证本地的podspec文件。

pod trunk push --allow-warnings

执行命令pod trunk push即可完成提交,该命令首先会验证你本地的podspec文件,之后会上传spec文件到trunk,最后会将上传的podspec文件转换为需要的json文件。

pod trunk info TestPodTrunk

pod trunk 遇到的问题


参考

CocoaPods Guides
【CocoaPods】细说 pod trunk
CocoaPods/Specs

上一篇 下一篇

猜你喜欢

热点阅读