更新自己的CocoaPods库

CocoaPod,iOS

Posted by Karim on June 21, 2017

以自己写的一个库为例子

Pod::Spec.new do |s|

  s.name         = "FFDB"
  s.version      = "1.7.0"
  s.summary      = "easy to use FMDB"
  s.homepage     = "https://github.com/Fidetro/FFDB"
  s.license          = { :type => "MIT", :file => "LICENSE" }
  s.author             = { "fidetro" => "zykzzzz@hotmail.com" }
  s.platform     = :ios, "8.0"
  s.source       = { :git => "https://github.com/Fidetro/FFDB.git", :tag => "1.7.0" }
  s.source_files  = "FFDB", "FFDB/*.{h,m}"
  s.library = 'sqlite3'
  s.dependency "FMDB","~> 2.6.2"


end

原本在CocoaPods的版本是s.version = "1.7.0" 如果要更新成1.8.0版本,先改成s.version = "1.8.0" 同时把s.source的tag改成 s.source = { :git => "https://github.com/Fidetro/FFDB.git", :tag => "1.8.0" }

git add *
git commit -m "tag 1.8.0"
git push origin -u master

再打上标签

git tag 1.8.0
git push --tags

最后提交到Pod

pod trunk push FFDB.podspec

请保持转载后文章内容的完整,以及文章出处。本人保留所有版权相关权利。

分享到: