Skip to main content

upgrade-examples

This skill should be used when upgrading the cocoindex package version in all example pyproject.toml files. It uses regex-based sed commands to efficiently update version constraints across multiple files at once.

来源信息

仓库
cocoindex-io/cocoindex
最近来源活动
2026年5月25日 21:24
检测到的 SKILL.md 语言
英语
星标
11,709
分支
919

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
upgrade-examples
description
This skill should be used when upgrading the cocoindex package version in all example pyproject.toml files. It uses regex-based sed commands to efficiently update version constraints across multiple files at once.
# Upgrade Example Dependencies Upgrade the cocoindex version in all example `pyproject.toml` files. ## Usage ``` /upgrade-examples <version> ``` Example: `/upgrade-examples 1.0.0a5` ## Instructions To upgrade all example dependencies (replace `VERSION` with the actual version, e.g., `1.0.0a10`): 1. Create a new branch for the changes: ```bash git checkout -b ex-dep-VERSION ``` 2. Run the following command to update all example pyproject.toml files. **Important:** Use the literal version string directly in the sed command. Do not use shell variables as quoting issues can cause the version to be omitted. ```bash find examples -name "pyproject.toml" -not -path "*/.venv/*" -exec grep -l "cocoindex" {} \; | xargs sed -i '' 's/cocoindex\([^>]*\)>=[0-9][0-9a-zA-Z.]*/cocoindex\1>=VERSION/g' ``` 3. Verify the changes show the correct version: ```bash grep -r "cocoindex.*>=" examples --include="pyproject.toml" | grep -v ".venv" ``` 4. Commit and push the changes: ```bash git add examples/*/pyproject.toml git commit -m "chore: upgrade examples deps to cocoindex-VERSION" git push -u origin ex-dep-VERSION ``` 5. Create a PR using the `gh` CLI and capture the PR URL from its output: ```bash gh pr create --base v1 --title "chore: upgrade examples deps to cocoindex-VERSION" --body "" ``` 6. Switch back to the previous branch and delete the local branch: ```bash git checkout v1 git branch -d ex-dep-VERSION ``` 7. Report the number of files updated and provide the PR link from the `gh pr create` output to the user.
在 GitHub 查看