Build all project into one sdk for app.
gomobile 打包时只保留了 package 路径的最后的报名作为对应 package 名称,比如包
comingchat/core/aptos打包结果的包名为aptos。 如果不同项目使用了相同的包名,则合在一起打包会失败。
| 包名 | 项目 |
|---|---|
| aptos | wallet-sdk |
| aptosclient | go-aptos |
| base | wallet-sdk |
| btc | wallet-sdk |
| core | wallet-sdk |
| cosmos | wallet-sdk |
| crossswap | go-defi-sdk |
| doge | wallet-sdk |
| eth | wallet-sdk |
| execution | go-defi-sdk |
| multi-signature-check | wallet-sdk |
| polka | wallet-sdk |
| redpacket | go-red-packet |
| service | go-defi-sdk |
| solana | wallet-sdk |
| types | go-defi-sdk |
| util | go-defi-sdk |
| wallet | wallet-sdk |
export GOPRIVATE=github.com/coming-chat/go-defi-sdk多个 private 仓库可以使用逗号分隔
export GOPRIVATE=github.com/coming-chat/go-defi-sdk,github.com/coming-chat/xx也可以指定到 github username,则此 username 下的包都会从 github 直接拉取
export GOPRIVATE=github.com/coming-chat或者整个所有 github.com 下的包都从 github 直接拉取
export GOPRIVATE=github.com有两种访问权限配置方式:ssh 和 账号密码
ssh 方式(推荐):
vi ~/.gitconfig修改为
[user]
email = [email protected]
name = Sammy the Shark
[url "ssh://[email protected]/"]
insteadOf = https://github.com/
密码方式:
vi ~/.netrc修改为:
machine github.com
login your_github_username
password your_github_access_token
首先使用 go get 安装指定版本的 go modules,在使用一下命令给 ios 或 android 打包。
打包前需要确保 out 目录下有对应的仓库,以及对应仓库的写权限:
git clone [email protected]:coming-chat/wallet-swift-package.git Wallet-iOS
git clone [email protected]:coming-chat/wallet-sdk-android.gitmake iosBuildAndPublish v=0.0.4-1661485378make androidBuildAndPublish v=0.0.4-1661485378首先建议在本地环境更新 mod 版本,并把 go.mod go.sum 推送到仓库。
在公司办公网络下,连接到 chainx_5G wifi,使用 ssh 登录到打包机,推荐使用 ssh 公钥登录:
- 进入打包机后执行
cdbuild跳转到此仓库根目录 git pull拉取 mod 更新- 使用
make iosBuildAndPublish v=yourversion或make androidBuildAndPublish v=yourversion打包即可
创建标签即可自动触发打包,并分别 push 到 android/ios 的仓库.