//tag
git tag //查看版本标签
git tag -a 1.0.0 -m '1.0.0版本完成' //打完tag 还是处于本地,需要 提交远程代码库
git push --tags //本地所有tags都提交
删除远程tag
git tag -d 0.0.1
git push origin :0.0.1
创建 spec
修改文件
pod spec create 文件名称
//修改podspec文件内容,如下 假设项目名称Test01
s.name = "Test01"
s.version = "1.0.0"
s.summary = "Test01 is a test lib"
s.description = <<-DESC
"这是一个长的描述字数要比s.summary长,Test01 is a test lib"
DESC
s.homepage = "https://github.com/LouKit/Test01"
s.license = "Apache License, Version 2.0"
s.author = { "LK" => "loukit@qq.com" }
s.source = { :git => "https://github.com/LouKit/Test01.git", :tag => "#{s.version}" }
s.source_files = "Classes", "Classes/**/*.{h,m}"
注册spec ,必须是GITHUB帐号
pod trunk register 512866393@qq.com 'scottlove0519' --verbose
pod repo
pod repo
去邮箱验证。
pod trunk me
- Name: scottlove0519
- Email: 512866393@qq.com
- Since: June 1st, 11:12
- Pods: None
- Sessions:
提交
pod trunk push ZLPhotoBrowser.podspec
pod trunk push --verbose --allow-warnings
验证spec文件 (从本地和远程验证你的pod能否通过验证)
pod spec lint
验证库(从本地验证你的pod能否通过验证)
pod lib lint
pod lib lint --verbose (加--verbose可以显示详细的检测过程,出错时会显示详细的错误信息)
pod lib lint --allow-warnings (允许警告,用来解决由于代码中存在警告导致不能通过校验的问题)
pod lib lint --use-libraries 使用库
搜索远程库
pod search ZLPhotoBrowser
搜索不到
rm ~/Library/Caches/CocoaPods/search_index.json
有可能tag不对,或者标点是中文。
spec文件说明
name:框架名
version:当前版本(注意,是当前版本,假如你后续更新了新版本,需要修改此处)
summary:简要描述,在pod search ZCPKit的时候会显示该信息。
description:详细描述
homepage:页面链接
license:开源协议
author:作者
source:源码git地址
platform:支持最低ios版本
source_files:源文件(可以包含.h和.m)
public_header_files:头文件(.h文件)
resources:资源文件(配置的文件都会被放到mainBundle中)
resource_bundles:资源文件(配置的文件会放到你自己指定的bundle中)
frameworks:依赖的系统框架
vendored_frameworks:依赖的非系统框架
libraries:依赖的系统库
vendored_libraries:依赖的非系统的静态库
dependency:依赖的三方库
删除缓存索引文件
$ rm ~/Library/Caches/CocoaPods/search_index.json
spec验证不过
1.可以先创建本地私有库,