初步想法
1、首先本地编译生成brew的bottle 包
1.0 本地创建 Repositories |
brew create https://github.com/Bytom/bytom/releases/download/v1.0.7/bytom-1.0.7-darwin_amd64.tgz
1.1修改formula 寻找正确到build 命令
目前直接在def install 加入 system './build.sh'
直接在运行build.sh不行,可能要copy build.sh内容进行编译
发现问题,formula里面的url一定要是编译好的binary tarball
1.1.0 如果提示找不到./build.sh 一定要修改step里面的内容,将文件夹定位到data/job/{$pipeline name}
1.1.1解决一个坑,使用buildkite 本地mac编译,git lock的时候不够权限,需要把目录设置权限
sudo chmod -R g+rwx {dir}
1.1.2如果step里面由brew,不能用sudo buildkiet-agent 会提示brew不能用sudo权限,先将brew相关的装好。
Checking boost library installation.
Boost 1.67.0 found at /usr/local.
Checking MongoDB C++ driver installation.
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
Homebrew returned an error installing pkg-config.
Exiting now.
1.2 本地编译生成bottle需要先设置项目build
1.3 使用brew test bot 发送pull request 会自动上传CI自动生成bottle
1.4 brew test-bot [options] url|formula: 如果formula错误,就解决formula
2、提交给项目maintainer上传到Github release