1、安装fastlane
安装方式建议参照官网,一共三种方式,这里只介绍前两种
sudo gem install bundler
./Gemfile
文件,然后在里面添加如下内容。Gemfile
文件,可以尝试在需要创建的目录执行:bundle init
。
source "https://rubygems.org"
gem "fastlane"
更新bundler
bundle update
fastlane
文件夹,里面会有Appfile
和Fastfile
文件。按住Shift+command+.
还会看到.env的配置文件2、fastlane配置
fastlane spaceauth -u [email]
sudo vim ~/.zshrc
export FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD=""
export FASTLANE_SESSION=""
保存后记得刷新配置
source ~/.zshrc
3、安装jenkins
brew install jenkins
brew services start jenkins
brew services stop jenkins
brew services restart jenkins
cat /Users/xxx/.jenkins/secrets/initialAdminPassword
4、jenkins配置
局域网使用IP访问jenkins的方式
修改下面路径下的plist配置。
1、~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist
2、/usr/local/opt/jenkins/homebrew.mxcl.jenkins.plist
若找不到相应配置,可以去看下homebrew所在文件
终端输入 /opt/homebrew/opt/jenkins 回车。输入open . 回车, 打开文件夹
将上面两个plist中的httpListenAddress后的ip地址,修改为本机IP或者0.0.0.0即可。
上述两个配置文件修改完后,重启Jenkins服务
$SCM_CHANGELOG
命令获取提交日志#!/bin/bash -l
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
cd ${WORKSPACE}/Live
echo "🌍 ${WORKSPACE}/Live 🌍 ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡️"
echo "🌍 start carthage update 🌍 ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡️"
carthage update --platform iOS
echo "🌍 start pod install 🌍 ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡️"
pod install
echo "🌍 start fastlane 🌍 ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡️"
bundle install
fastlane pub_test changeLog:$SCM_CHANGELOG
文章评论