{"id":17463885,"url":"https://github.com/linxunfeng/condor","last_synced_at":"2025-04-14T18:51:49.956Z","repository":{"id":223117190,"uuid":"750105093","full_name":"LinXunFeng/condor","owner":"LinXunFeng","description":"由Dart实现的脚本工具集","archived":false,"fork":false,"pushed_at":"2025-04-04T12:49:45.000Z","size":66,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T13:41:40.947Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/condor_cli","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LinXunFeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"linxunfeng"}},"created_at":"2024-01-30T01:47:02.000Z","updated_at":"2025-04-04T12:48:46.000Z","dependencies_parsed_at":"2025-03-18T07:24:19.354Z","dependency_job_id":"e8834fd6-09e3-44a9-9f21-3d7844b001ed","html_url":"https://github.com/LinXunFeng/condor","commit_stats":null,"previous_names":["linxunfeng/condor"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinXunFeng%2Fcondor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinXunFeng%2Fcondor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinXunFeng%2Fcondor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinXunFeng%2Fcondor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinXunFeng","download_url":"https://codeload.github.com/LinXunFeng/condor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248941552,"owners_count":21186916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-18T10:44:02.808Z","updated_at":"2025-04-14T18:51:49.949Z","avatar_url":"https://github.com/LinXunFeng.png","language":"Dart","funding_links":["https://ko-fi.com/linxunfeng","https://ko-fi.com/T6T4JKVRP"],"categories":[],"sub_categories":[],"readme":"## ☕ 请我喝一杯咖啡\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/T6T4JKVRP) [![wechat](https://img.shields.io/static/v1?label=WeChat\u0026message=微信收款码\u0026color=brightgreen\u0026style=for-the-badge\u0026logo=WeChat)](https://cdn.jsdelivr.net/gh/FullStackAction/PicBed@resource20220417121922/image/202303181116760.jpeg)\n\n微信技术交流群请看: [【微信群说明】](https://mp.weixin.qq.com/s/JBbMstn0qW6M71hh-BRKzw)\n\n## 安装\n\n### Homebrew\n\n首次安装\n\n```shell\nbrew tap LinXunFeng/tap \u0026\u0026 brew install condor\n```\n\n更新\n```shell\nbrew update \u0026\u0026 brew reinstall condor\n```\n\n### Pub Global\n\n```shell\ndart pub global activate condor_cli\n```\n\n## 使用\n\n### Copilot - 解除限制\n\n\u003e 文章：[AI - RooCode 解限使用 Copilot Claude 3.7](https://mp.weixin.qq.com/s/MPgDkJ37s9X7DzAvS4azwQ)\n\n在 `Cline` 和 `RooCode` 中使用 `VS Code LM API` + `copilot - claude-3.7.sonnet` 时，会出现如下错误\n\n```\nRequest Failed: 400 {\"error\":{\"message\":\"Model is not supported for this request.\",\"param\":\"model\",\"code\":\"model_not_supported\",\"type\":\"invalid_request_error\"}}\n\nRetry attempt 1\nRetrying in 5 seconds...\n```\n\n限制的情况，此时可以通过 `condor` 来解除限制\n\n```shell\ncondor copilot freedom\n```\n\n杀掉并重启 `VS Code` 即可\n\n\n### 符号表\n\n\u003cdetails\u003e\n\n\u003csummary\u003e符号表配置初始化与上传\u003c/summary\u003e\n\n#### 初始化\n\n输出配置文件到指定目录\n\n```shell\ncondor init -o ~/Downloads/condor\n```\n\n如有些配置是固定的，可以通过 `-r` 参数指定一个配置文件的路径，这样会将固定的配置写入到输出的配置文件中进行覆盖\n\n```shell\ncondor init -o ~/Downloads/condor -r ~/Downloads/condor/config2.yaml\n```\n\n|参数|别名|描述|\n|-|-|-|\n|`ref`|`r`|指定固定配置文件的路径|\n|`out`|`o`|指定配置文件的输出目录路径|\n|`symbolZipPath`|-|符号表压缩包路|\n|`bundleId`|-|`app` 的 `bundleId`|\n|`version`|-|`app` 的版本|\n|`flutterVersion`|-|`Flutter` 版本|\n|`buglyAppId`|-|`bugly` 的 `appid`|\n|`buglyAppKey`|-|`bugly` 的 `appkey`|\n|`buglyJarPath`|-|`buglyqq-upload-symbol.jar` 的路径|\n\n\n#### 上传符号表\n\n\u003e 针对 `fastlane` 打出来的符号表压缩包\n\n通过指定最后的配置文件的路径来上传符号表\n\n```shell\ncondor upload -c ~/Downloads/condor/config.yaml\n```\n\n\u003c/details\u003e\n\n### Flutter\n\n输出当前的 `flutter` 版本\n\n```shell\n# 输出\n# 3.13.9\ncondor flutter version print\n```\n\n```shell\n# 输出 fvm 指定的 flutter 的版本\n# 3.7.12\ncondor flutter version print -f 'fvm spawn 3.7.12'\n```\n\n在 `jenkins` 中使用\n\n\u003e 以 `FLUTTER_VERSION` 环境变量来记录当前的 `flutter` 版本供全局使用\n\n```groovy\nenvironment {\n  FLUTTER_VERSION = sh(script: \"condor flutter version print -f 'fvm spawn ${flutter_version}'\", returnStdout: true).trim()\n}\n```\n\n### 优化 `Flutter` 项目 `ios` 端的编译速度\n\n\u003e 文章：[Flutter - iOS编译加速](https://mp.weixin.qq.com/s/iyvoAMCvC8WKN-zWsQcU_w)\n\n依赖 [Rugby](https://github.com/swiftyfinch/Rugby) 实现，所以需要先安装 `Rugby`\n\n```shell\ncurl -Ls https://swiftyfinch.github.io/rugby/install.sh | bash\n```\n\n在你的终端配置(如: `~/.zshrc`)中添加如下配置\n\n```shell\nexport PATH=$PATH:~/.rugby/clt\n```\n\n在 `pod install` 完成后执行如下命令进行优化\n\n```shell\ncondor optimize-build --config path/to/rugby/plans.yml\n```\n\n指定 `flutter` 版本\n\n```shell\ncondor optimize-build \\\n  --config path/to/rugby/plans.yml \\\n  --flutter \"fvm spawn 3.24.5\"\n```\n\n指定编译模式\n\n通过 `--mode` 指定，或者设置环境变量 `export CONDOR_BUILD_MODE=release`\n\n```shell\ncondor optimize-build \\\n  --config path/to/rugby/plans.yml \\\n  --mode release\n```\n\n### 使用 `Xcode 15` 的工具链优化 `Xcode 16` 的编译\n\n请先安装 `Xcode 16` 以下的版本，如: `Xcode 15.4.0`，建议使用 [XcodesApp](https://github.com/XcodesOrg/XcodesApp) 进行安装\n\n安装完成后，把对应的 `Xcode` 名字记下，如 `/Applications/Xcode-15.4.0.app`，则取 `Xcode-15.4.0`，给下面的命令使用。\n\n#### 拷贝 `xctoolchain`\n\n```shell\ncondor optimize-build xctoolchain-copy --xcode Xcode-15.4.0\n```\n\n#### 重定向 `cc`\n\n这一步会对 `flutter_tools` 源码进行修改，使其具备重定向 `cc` 的能力而已，在有配置 `CONDOR_TOOLCHAINS` 环境变量时才会生效，否则则使用默认的 `cc`。\n\n```shell\n# 使用默认 flutter，则不需要传 flutter 参数\ncondor optimize-build redirect-cc\n\n# 如果你想指定 fvm 下的指定 Flutter 版本\ncondor optimize-build redirect-cc --flutter fvm spawn 3.24.5\n```\n\n设置环境变量 `CONDOR_TOOLCHAINS`，值为上述的 `Xcode` 名。\n\n```shell\nexport CONDOR_TOOLCHAINS=Xcode-15.4.0\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinxunfeng%2Fcondor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinxunfeng%2Fcondor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinxunfeng%2Fcondor/lists"}