上传framwork 到git上和打tag

注意:.git 是掩藏文件,需command+shift+.    注意最后的是符号小点

查看pod注册信息

pod trunk me

如果没有注册信息,注册

pod trunk register  邮箱地址  名字  --verbose

注册成功后,到邮箱中查看邮件提示信息,然后确认邮件

再次查看注册信息: pod trunk me

在gitee或者git上建立仓库,记得勾选忽略文件、凭证信息,凭证后面有用到

把建立的仓库clone下

在于.git 同级目录下,创建podspec文件:

pod spec create  xxxx       例子:pod spec create  MaTestSDK

然后打开podspec文件,按照英文提示填写相关信息

如果有ARC 则打开s.requires_arc = true

spec.static_framework = true //表示静态库

spec.resource加载framework的资源文件,资源文件的路径是与.git同级目录开始的,我这个Tool是我自己创建的文件夹

spec.resource  = "Tool/xx.framework/xxx.bundle"  

vendored_frameworks加载framework的地方,路径也是与.git同级目录开始的,我这个Tool是我自己创建的文件夹

spec.ios.vendored_frameworks = 'Tool/xx.framework'


先本地验证,cd到 .git同级目录下

pod lib lint  xxx.podspec --verbose --use-libraries --allow-warnings --skip-import-validation

添加git 信息

git add -A && git commit -m "version 1.0.0"

git tag '1.0.0'      //注意,这里的tag一定是和podspec的版本号是一致的

git push --tags

//Username 是 你git账号的名称不是登录邮箱,密码已经在2021年8月废弃,要输入fine-grained tokens的令牌作为密码

git push origin master


远端验证

$ pod spec lint或者(--verbose 可以显示详细错误信息)(--use-libraries 有引入私有.a/framework 包)$ pod spec lint --use-libraries --verbose或者(--allow-warnings 忽略警告信息继续操作)$ pod spec lint --allow-warnings

当看到xxx.podspec passed validation  的时候就说明验证通过了,可进行下一步

再:$ pod trunk pushXXX.podspec或者(--allow-warnings 忽略警告提交)$ pod trunk push xxx.podspec --allow-warnings


==============Congrats =====

这就表示成功了

再 pod  trunk me   看看信息


<your_token>:换成你自己得到的token

<USERNAME>:是你自己github的用户名

<REPO>:是你的仓库名称

git remote set-url origin https://<your_token>@github.com/<USERNAME>/<REPO>.git


删除远端分支

git push origin --delete 分支名字


将 线上和线下代码合并

git pull --rebase origin master    然后再 push指令:    git push origin master


cong

[remote "origin"]

        url = 自己项目地址

        fetch = +refs/heads/*:refs/remotes/origin/*

[branch "master"]

        remote = origin

        merge = refs/heads/master


参考文献:https://www.jianshu.com/p/b741b9fd6999

https://blog.csdn.net/chuyouyinghe/article/details/122203309

https://blog.csdn.net/qq_34756209/article/details/88555435/

https://blog.csdn.net/weixin_40599109/article/details/108449122

冲突解决方式:

https://blog.csdn.net/ourstronger/article/details/103460249

一句话解决“ Unable to find a specification for xxxxxx” 问题

https://blog.csdn.net/liuyanqinmn/article/details/116484068

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容