一款快速上传项目到git及建立自己的私有Pod源脚本,方便快捷。下载podShell
1.先到git上开一个repo。

2.创建文件夹,将podShell拖入到文件夹。
通过终端进入文件夹路径。

3.运行.config.sh文件。
依次填入对应的信息

最后发现podShell同级文件夹会如下图所示。

4.将需要上传的文件拖入到图中Demo文件夹目录即可,运行tag.sh
输入对应的tag号

此时已经将项目上传至git并打上tag值。但是还没有发布自己的Pods。
5.注册Trunk
pod trunk register email 'name' --description='macbook air'

此时,你的邮箱会收到一封邮件。复制链接打开即可。

6.发布到pod trunk
pod trunk push leoTestDemo.podspec

如上图所示发布成功
7.更新pod库
发布成功。通过pod search指令可能不是立即找到我们发布的项目,可通过下面两条指令操作。
pod setup
删除本地索引
rm -f ~/Library/Caches/CocoaPods/search_index.json
网友评论