chore(release): bump version to 0.5.0 and update changelog
This commit is contained in:
20
CHANGELOG.md
20
CHANGELOG.md
@@ -9,6 +9,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
暂无。
|
暂无。
|
||||||
|
|
||||||
|
## [0.5.0] - 2026-07-24
|
||||||
|
|
||||||
|
### ✨ 新功能
|
||||||
|
- `commit` 命令新增 `.gitignore` 文件过滤:自动暂存与 `--all` 模式下自动跳过被 `.gitignore` 规则匹配的文件,并清理索引中已被忽略的已跟踪文件,暂存完成后列出被移除的文件
|
||||||
|
- `tag` 命令新增 `-A, --auto` 模式:优先从 `Cargo.toml`/`pyproject.toml` 读取项目版本,回退到基于 commit 的语义化升级分析(与 `--bump` 互斥)
|
||||||
|
- `changelog` 命令在未指定 `--from` 时,自动检测现有 changelog 中最高版本对应的 tag 作为起始点
|
||||||
|
- 新增 `parse_changelog_versions()`,按 semver 降序提取 changelog 中已有的版本
|
||||||
|
- 新增 `sort_tags_by_semver()`,取代纯时间排序,按语义版本正确排序标签
|
||||||
|
|
||||||
|
### 🐞 错误修复
|
||||||
|
- 修复 `get_tags()` 对 annotated tag 的解析:改用 `find_object`+`peel_to_commit` 正确取得标签指向的 commit
|
||||||
|
- 修复 `changelog` 写入时 `insert_changelog_entry` 覆盖已有章节的问题,现保留现有内容并按版本插入新条目
|
||||||
|
|
||||||
|
### 📚 文档
|
||||||
|
- 同步更新 README(中/英文):补充 `--think`、`tag --auto` 选项说明,移除已废弃的 `--prepend` 参数,修正 `set-llm` 的 `--base-url` 选项名
|
||||||
|
|
||||||
|
### 🔧 其他变更
|
||||||
|
- 新增 `TagInfo::version_name()` 与 `GitRepo::find_tag_by_version()` 辅助方法
|
||||||
|
- 新增 `tests/gitignore_tests.rs`,包含 7 个测试覆盖 `.gitignore` 过滤逻辑
|
||||||
|
|
||||||
## [0.4.0] - 2026-07-16
|
## [0.4.0] - 2026-07-16
|
||||||
|
|
||||||
### ✨ 新功能
|
### ✨ 新功能
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "quicommit"
|
name = "quicommit"
|
||||||
version = "0.4.1"
|
version = "0.5.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
authors = ["Sidney Zhang <zly@lyzhang.me>"]
|
authors = ["Sidney Zhang <zly@lyzhang.me>"]
|
||||||
description = "A powerful Git assistant tool with AI-powered commit/tag/changelog generation"
|
description = "A powerful Git assistant tool with AI-powered commit/tag/changelog generation"
|
||||||
|
|||||||
30
README.md
30
README.md
@@ -63,7 +63,7 @@ quicommit commit
|
|||||||
# Manual commit
|
# Manual commit
|
||||||
quicommit commit --manual -t feat -m "add new feature"
|
quicommit commit --manual -t feat -m "add new feature"
|
||||||
|
|
||||||
# Stage all and commit
|
# Stage all and commit (skips .gitignore-matched files automatically)
|
||||||
quicommit commit -a
|
quicommit commit -a
|
||||||
|
|
||||||
# Skip confirmation
|
# Skip confirmation
|
||||||
@@ -72,16 +72,24 @@ quicommit commit --yes
|
|||||||
# Use date-based commit message
|
# Use date-based commit message
|
||||||
quicommit commit --date
|
quicommit commit --date
|
||||||
|
|
||||||
|
# Enable LLM thinking/reasoning mode for this commit
|
||||||
|
quicommit commit --think
|
||||||
|
|
||||||
# Push after committing
|
# Push after committing
|
||||||
quicommit commit --push
|
quicommit commit --push
|
||||||
```
|
```
|
||||||
|
|
||||||
|
When staging changes (auto-stage or `--all`), files matched by `.gitignore` rules are skipped and any ignored files already in the index are removed; the skipped list is printed for review.
|
||||||
|
|
||||||
### Create Tag
|
### Create Tag
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Auto-detect version bump
|
# Auto-detect version bump
|
||||||
quicommit tag
|
quicommit tag
|
||||||
|
|
||||||
|
# Auto-detect version from Cargo.toml/pyproject.toml, fall back to commit analysis
|
||||||
|
quicommit tag --auto
|
||||||
|
|
||||||
# Specify bump type
|
# Specify bump type
|
||||||
quicommit tag --bump minor
|
quicommit tag --bump minor
|
||||||
|
|
||||||
@@ -98,11 +106,14 @@ quicommit tag --push
|
|||||||
### Generate Changelog
|
### Generate Changelog
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Generate for unreleased changes
|
# Generate for unreleased changes (auto-detects --from from the highest version in the existing changelog)
|
||||||
quicommit changelog
|
quicommit changelog
|
||||||
|
|
||||||
# Generate for specific version
|
# Generate for specific version
|
||||||
quicommit changelog -v 1.0.0
|
quicommit changelog --version 1.0.0
|
||||||
|
|
||||||
|
# Generate from a specific tag
|
||||||
|
quicommit changelog --from v0.9.0
|
||||||
|
|
||||||
# AI-generate changelog
|
# AI-generate changelog
|
||||||
quicommit changelog --generate
|
quicommit changelog --generate
|
||||||
@@ -222,7 +233,7 @@ quicommit profile token
|
|||||||
```bash
|
```bash
|
||||||
# Configure Ollama (local)
|
# Configure Ollama (local)
|
||||||
quicommit config set-llm ollama
|
quicommit config set-llm ollama
|
||||||
quicommit config set-llm ollama --url http://localhost:11434 --model llama2
|
quicommit config set-llm ollama --base-url http://localhost:11434 --model llama2
|
||||||
|
|
||||||
# Configure OpenAI
|
# Configure OpenAI
|
||||||
quicommit config set-llm openai
|
quicommit config set-llm openai
|
||||||
@@ -309,13 +320,14 @@ quicommit config reset --force
|
|||||||
| `-b, --breaking` | Mark as breaking change |
|
| `-b, --breaking` | Mark as breaking change |
|
||||||
| `-d, --date` | Use date-based commit message |
|
| `-d, --date` | Use date-based commit message |
|
||||||
| `--manual` | Manual input, skip AI |
|
| `--manual` | Manual input, skip AI |
|
||||||
| `-a, --all` | Stage all changes |
|
| `-a, --all` | Stage all changes (skips `.gitignore`-matched files) |
|
||||||
| `-S, --sign` | GPG sign commit |
|
| `-S, --sign` | GPG sign commit |
|
||||||
| `--amend` | Amend previous commit |
|
| `--amend` | Amend previous commit |
|
||||||
| `--dry-run` | Show without committing |
|
| `--dry-run` | Show without committing |
|
||||||
| `--conventional` | Use Conventional Commits format |
|
| `--conventional` | Use Conventional Commits format |
|
||||||
| `--commitlint` | Use commitlint format |
|
| `--commitlint` | Use commitlint format |
|
||||||
| `--no-verify` | Skip commit message verification |
|
| `--no-verify` | Skip commit message verification |
|
||||||
|
| `-t, --think` | Enable LLM thinking/reasoning mode (overrides config) |
|
||||||
| `-y, --yes` | Skip confirmation |
|
| `-y, --yes` | Skip confirmation |
|
||||||
| `--push` | Push after committing |
|
| `--push` | Push after committing |
|
||||||
| `--remote` | Specify remote repository (default: origin) |
|
| `--remote` | Specify remote repository (default: origin) |
|
||||||
@@ -326,6 +338,7 @@ quicommit config reset --force
|
|||||||
|--------|-------------|
|
|--------|-------------|
|
||||||
| `-n, --name` | Tag name |
|
| `-n, --name` | Tag name |
|
||||||
| `-b, --bump` | Version bump (major/minor/patch) |
|
| `-b, --bump` | Version bump (major/minor/patch) |
|
||||||
|
| `-A, --auto` | Auto-detect version from Cargo.toml/pyproject.toml, fall back to commit analysis (conflicts with `--bump`) |
|
||||||
| `-m, --message` | Tag message |
|
| `-m, --message` | Tag message |
|
||||||
| `-g, --generate` | AI-generate message |
|
| `-g, --generate` | AI-generate message |
|
||||||
| `-S, --sign` | GPG sign tag |
|
| `-S, --sign` | GPG sign tag |
|
||||||
@@ -334,6 +347,7 @@ quicommit config reset --force
|
|||||||
| `-p, --push` | Push to remote |
|
| `-p, --push` | Push to remote |
|
||||||
| `-r, --remote` | Specify remote repository (default: origin) |
|
| `-r, --remote` | Specify remote repository (default: origin) |
|
||||||
| `--dry-run` | Dry run |
|
| `--dry-run` | Dry run |
|
||||||
|
| `-t, --think` | Enable LLM thinking/reasoning mode (overrides config) |
|
||||||
| `-y, --yes` | Skip confirmation |
|
| `-y, --yes` | Skip confirmation |
|
||||||
|
|
||||||
### Changelog Options
|
### Changelog Options
|
||||||
@@ -341,16 +355,16 @@ quicommit config reset --force
|
|||||||
| Option | Description |
|
| Option | Description |
|
||||||
|--------|-------------|
|
|--------|-------------|
|
||||||
| `-o, --output` | Output file path |
|
| `-o, --output` | Output file path |
|
||||||
| `-v, --version` | Generate for specific version |
|
| `--version` | Generate for specific version |
|
||||||
| `-f, --from` | Generate from specific tag |
|
| `-f, --from` | Generate from specific tag (auto-detected from existing changelog if omitted) |
|
||||||
| `-t, --to` | Generate to specific ref (default: HEAD) |
|
| `-t, --to` | Generate to specific ref (default: HEAD) |
|
||||||
| `-i, --init` | Initialize new changelog file |
|
| `-i, --init` | Initialize new changelog file |
|
||||||
| `-g, --generate` | AI-generate changelog |
|
| `-g, --generate` | AI-generate changelog |
|
||||||
| `--prepend` | Prepend to existing changelog |
|
|
||||||
| `--include-hashes` | Include commit hashes |
|
| `--include-hashes` | Include commit hashes |
|
||||||
| `--include-authors` | Include authors |
|
| `--include-authors` | Include authors |
|
||||||
| `--format` | Format (keep-a-changelog, github-releases) |
|
| `--format` | Format (keep-a-changelog, github-releases) |
|
||||||
| `--dry-run` | Dry run (output to stdout) |
|
| `--dry-run` | Dry run (output to stdout) |
|
||||||
|
| `--think` | Enable LLM thinking/reasoning mode (overrides config) |
|
||||||
| `-y, --yes` | Skip confirmation |
|
| `-y, --yes` | Skip confirmation |
|
||||||
|
|
||||||
## Configuration File
|
## Configuration File
|
||||||
|
|||||||
30
readme_zh.md
30
readme_zh.md
@@ -62,7 +62,7 @@ quicommit commit
|
|||||||
# 手动提交
|
# 手动提交
|
||||||
quicommit commit --manual -t feat -m "添加新功能"
|
quicommit commit --manual -t feat -m "添加新功能"
|
||||||
|
|
||||||
# 暂存所有文件并提交
|
# 暂存所有文件并提交(自动跳过 .gitignore 匹配的文件)
|
||||||
quicommit commit -a
|
quicommit commit -a
|
||||||
|
|
||||||
# 跳过确认直接提交
|
# 跳过确认直接提交
|
||||||
@@ -71,16 +71,24 @@ quicommit commit --yes
|
|||||||
# 使用日期格式的提交信息
|
# 使用日期格式的提交信息
|
||||||
quicommit commit --date
|
quicommit commit --date
|
||||||
|
|
||||||
|
# 为本次提交启用 LLM 思考/推理模式
|
||||||
|
quicommit commit --think
|
||||||
|
|
||||||
# 提交后推送到远程
|
# 提交后推送到远程
|
||||||
quicommit commit --push
|
quicommit commit --push
|
||||||
```
|
```
|
||||||
|
|
||||||
|
在暂存更改时(自动暂存或 `--all` 模式),会自动跳过匹配 `.gitignore` 规则的文件,并清理索引中已被忽略的已跟踪文件,最后打印出被跳过的文件列表。
|
||||||
|
|
||||||
### 创建标签
|
### 创建标签
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 自动检测版本升级
|
# 自动检测版本升级
|
||||||
quicommit tag
|
quicommit tag
|
||||||
|
|
||||||
|
# 从 Cargo.toml/pyproject.toml 自动检测版本,回退到基于 commit 的分析
|
||||||
|
quicommit tag --auto
|
||||||
|
|
||||||
# 指定版本升级类型
|
# 指定版本升级类型
|
||||||
quicommit tag --bump minor
|
quicommit tag --bump minor
|
||||||
|
|
||||||
@@ -97,11 +105,14 @@ quicommit tag --push
|
|||||||
### 生成变更日志
|
### 生成变更日志
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 生成未发布变更的变更日志
|
# 生成未发布变更的变更日志(未指定 --from 时自动从现有 changelog 的最高版本检测)
|
||||||
quicommit changelog
|
quicommit changelog
|
||||||
|
|
||||||
# 为特定版本生成
|
# 为特定版本生成
|
||||||
quicommit changelog -v 1.0.0
|
quicommit changelog --version 1.0.0
|
||||||
|
|
||||||
|
# 从指定标签生成
|
||||||
|
quicommit changelog --from v0.9.0
|
||||||
|
|
||||||
# AI生成变更日志
|
# AI生成变更日志
|
||||||
quicommit changelog --generate
|
quicommit changelog --generate
|
||||||
@@ -216,7 +227,7 @@ quicommit profile token
|
|||||||
```bash
|
```bash
|
||||||
# 配置Ollama(本地)
|
# 配置Ollama(本地)
|
||||||
quicommit config set-llm ollama
|
quicommit config set-llm ollama
|
||||||
quicommit config set-llm ollama --url http://localhost:11434 --model llama2
|
quicommit config set-llm ollama --base-url http://localhost:11434 --model llama2
|
||||||
|
|
||||||
# 配置OpenAI
|
# 配置OpenAI
|
||||||
quicommit config set-llm openai
|
quicommit config set-llm openai
|
||||||
@@ -303,13 +314,14 @@ quicommit config reset --force
|
|||||||
| `-b, --breaking` | 标记为破坏性变更 |
|
| `-b, --breaking` | 标记为破坏性变更 |
|
||||||
| `-d, --date` | 使用日期格式的提交信息 |
|
| `-d, --date` | 使用日期格式的提交信息 |
|
||||||
| `--manual` | 手动输入,跳过AI生成 |
|
| `--manual` | 手动输入,跳过AI生成 |
|
||||||
| `-a, --all` | 暂存所有更改 |
|
| `-a, --all` | 暂存所有更改(自动跳过 `.gitignore` 匹配的文件) |
|
||||||
| `-S, --sign` | GPG签名提交 |
|
| `-S, --sign` | GPG签名提交 |
|
||||||
| `--amend` | 修改上一次提交 |
|
| `--amend` | 修改上一次提交 |
|
||||||
| `--dry-run` | 试运行,不实际提交 |
|
| `--dry-run` | 试运行,不实际提交 |
|
||||||
| `--conventional` | 使用Conventional Commits格式 |
|
| `--conventional` | 使用Conventional Commits格式 |
|
||||||
| `--commitlint` | 使用commitlint格式 |
|
| `--commitlint` | 使用commitlint格式 |
|
||||||
| `--no-verify` | 不验证提交信息 |
|
| `--no-verify` | 不验证提交信息 |
|
||||||
|
| `-t, --think` | 启用 LLM 思考/推理模式(覆盖配置) |
|
||||||
| `-y, --yes` | 跳过确认提示 |
|
| `-y, --yes` | 跳过确认提示 |
|
||||||
| `--push` | 提交后推送到远程 |
|
| `--push` | 提交后推送到远程 |
|
||||||
| `--remote` | 指定远程仓库(默认:origin) |
|
| `--remote` | 指定远程仓库(默认:origin) |
|
||||||
@@ -320,6 +332,7 @@ quicommit config reset --force
|
|||||||
|------|------|
|
|------|------|
|
||||||
| `-n, --name` | 标签名称 |
|
| `-n, --name` | 标签名称 |
|
||||||
| `-b, --bump` | 版本升级类型(major/minor/patch) |
|
| `-b, --bump` | 版本升级类型(major/minor/patch) |
|
||||||
|
| `-A, --auto` | 从 Cargo.toml/pyproject.toml 自动检测版本,回退到基于 commit 的分析(与 `--bump` 互斥) |
|
||||||
| `-m, --message` | 标签信息 |
|
| `-m, --message` | 标签信息 |
|
||||||
| `-g, --generate` | AI生成标签信息 |
|
| `-g, --generate` | AI生成标签信息 |
|
||||||
| `-S, --sign` | GPG签名标签 |
|
| `-S, --sign` | GPG签名标签 |
|
||||||
@@ -328,6 +341,7 @@ quicommit config reset --force
|
|||||||
| `-p, --push` | 推送到远程 |
|
| `-p, --push` | 推送到远程 |
|
||||||
| `-r, --remote` | 指定远程仓库(默认:origin) |
|
| `-r, --remote` | 指定远程仓库(默认:origin) |
|
||||||
| `--dry-run` | 试运行 |
|
| `--dry-run` | 试运行 |
|
||||||
|
| `-t, --think` | 启用 LLM 思考/推理模式(覆盖配置) |
|
||||||
| `-y, --yes` | 跳过确认提示 |
|
| `-y, --yes` | 跳过确认提示 |
|
||||||
|
|
||||||
### changelog命令选项
|
### changelog命令选项
|
||||||
@@ -335,16 +349,16 @@ quicommit config reset --force
|
|||||||
| 选项 | 说明 |
|
| 选项 | 说明 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| `-o, --output` | 输出文件路径 |
|
| `-o, --output` | 输出文件路径 |
|
||||||
| `-v, --version` | 为特定版本生成 |
|
| `--version` | 为特定版本生成 |
|
||||||
| `-f, --from` | 从指定标签生成 |
|
| `-f, --from` | 从指定标签生成(未指定时自动从现有 changelog 的最高版本检测) |
|
||||||
| `-t, --to` | 生成到指定引用(默认:HEAD) |
|
| `-t, --to` | 生成到指定引用(默认:HEAD) |
|
||||||
| `-i, --init` | 初始化新的变更日志文件 |
|
| `-i, --init` | 初始化新的变更日志文件 |
|
||||||
| `-g, --generate` | AI生成变更日志 |
|
| `-g, --generate` | AI生成变更日志 |
|
||||||
| `--prepend` | 添加到现有变更日志开头 |
|
|
||||||
| `--include-hashes` | 包含提交哈希 |
|
| `--include-hashes` | 包含提交哈希 |
|
||||||
| `--include-authors` | 包含作者信息 |
|
| `--include-authors` | 包含作者信息 |
|
||||||
| `--format` | 格式(keep-a-changelog、github-releases) |
|
| `--format` | 格式(keep-a-changelog、github-releases) |
|
||||||
| `--dry-run` | 试运行(输出到stdout) |
|
| `--dry-run` | 试运行(输出到stdout) |
|
||||||
|
| `--think` | 启用 LLM 思考/推理模式(覆盖配置) |
|
||||||
| `-y, --yes` | 跳过确认提示 |
|
| `-y, --yes` | 跳过确认提示 |
|
||||||
|
|
||||||
## 配置文件
|
## 配置文件
|
||||||
|
|||||||
Reference in New Issue
Block a user