美文网首页
日记 - 配置打包CI

日记 - 配置打包CI

作者: 梅林骑士 | 来源:发表于2023-12-05 11:31 被阅读0次

准备优化下打包流程,采用FastLane。

  • 看了下说明,需要先安装Ruby.
    下载ruby
    解压并且执行下面的指令。
$ cd ruby-3.2.2
$ ./configure
$ make
$ sudo make install

好家伙就知道不会这么顺利

*** Following extensions are not compiled:
openssl:
    Could not be configured. It will not be installed.
    /Users/yizhihao/work/env/ruby-3.2.2/ext/openssl/extconf.rb:101: OpenSSL library could not be found. You might want to use --with-openssl-dir=<dir> option to specify the prefix where OpenSSL is installed.
    Check ext/openssl/mkmf.log for more details.
psych:
    Could not be configured. It will not be installed.
    Check ext/psych/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.

看了些资料都是说用brew、rvm 或 rbenv去安装,可是brew环境也没有。

随机选了rvm环境安装。
安装 GPG 密钥:
RVM 的安装脚本是通过 GPG 签名来验证的。首先,你需要导入用于验证 RVM 安装包的 GPG 密钥。在终端中运行以下命令:

gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

如果上面的命令因为某些原因失败,可以尝试使用其他的密钥服务器或直接通过 cURL 获取密钥。

安装 RVM:
通过运行以下命令来安装 RVM:

\curl -sSL https://get.rvm.io | bash -s stable

这将安装最新稳定版本的 RVM。
然后配置环境。

echo 'source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
source ~/.bashrc  # 或 source ~/.zshrc

继续安装ruby

rvm install ruby-3.2.2

还是辅助安装工具安装简单,ruby安装完毕。
然后就是安装fastlane。

sudo gem install fastlane

安装完毕之后,到指定项目里执行下面指令就可以初始化项目的fastlane环境了。

fastlane init

执行完毕会出现下列文件


fastlane init

以上主要参考官方的FastLane安装教程

相关文章

网友评论

      本文标题:日记 - 配置打包CI

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