美文网首页
git创建远程依赖库管理私有库

git创建远程依赖库管理私有库

作者: 1234yws | 来源:发表于2019-02-19 11:13 被阅读2次

1、添加本地远程私有库

pod repo add RelySpec https://gitee.com/1234yws/RelySpec

2、创建远程私有库,clone下来

git clone https://gitee.com/1234yws/RelyA.git

3、创建RelyA Xcode工程 将文件全部放入到clone下的文件夹内
4、然后 push 到仓库

git add .
git commit -m '备注'
git push

5、把 RelyA 配置成私有 Pod 创建spec文件

pod spec create RelyA https://gitee.com/1234yws/RelyA.git
之后会在 RelyA 工程中生成PeivateB.podspec文件。

6、创建LICENSE

s.license          = { :type => 'MIT', :file => 'LICENSE' }

7、配置spec文件

//注意,这里需要制作库的文件地址
  s.source_files  = "PrivateB/Classes", "PrivateB/Classes/**/*.{h,m}"
  s.platform     = :ios, "8.0"

8、将修改后的工程重新上传到git上

git add .
git commit -m '备注'
git push

9、打上版本号,一定要和spec文件内设置的版本号一致

git tag '0.0.1'
git push --tag

10、添加到私有的Pods源中

pod repo push RelySpec RelyA.podspec

注意

出现file patterns: The source_files pattern did not match any file.可以换个换个tag号可以解决

相关文章

网友评论

      本文标题:git创建远程依赖库管理私有库

      本文链接:https://www.haomeiwen.com/subject/eposjqtx.html