Skip to content

Commit e7b74fe

Browse files
committed
feat: add release automation for synchronized version bumps in vtagent-core
1 parent 0d9de31 commit e7b74fe

File tree

4 files changed

+38
-4
lines changed

4 files changed

+38
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ All notable changes to vtcode will be documented in this file.
4646
- **Flexible Methodology**: Adaptable problem-solving approaches
4747
- **Quality First**: Emphasize correctness over speed
4848

49+
### **Release Automation**
50+
51+
- **Coordinated Version Bumps**: `scripts/release.sh` now prompts maintainers to bump the `vtagent-core` crate alongside the main binary, keeping release metadata synchronized.
52+
4953
### **Transparency & Observability**
5054

5155
#### Verbose Mode Enhancements

docs/project/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ All notable changes to vtcode will be documented in this file.
4646
- **Flexible Methodology**: Adaptable problem-solving approaches
4747
- **Quality First**: Emphasize correctness over speed
4848

49+
### **Release Automation**
50+
51+
- **Coordinated Version Bumps**: `scripts/release.sh` now prompts maintainers to bump the `vtagent-core` crate alongside the main binary, keeping release metadata synchronized.
52+
4953
### **Transparency & Observability**
5054

5155
#### Verbose Mode Enhancements

scripts/release.sh

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,14 @@ update_homebrew_formula() {
259259
print_info "4. Users can then run: brew install vinhnx/tap/vtcode"
260260
}
261261

262+
# Function to update version in vtagent-core/Cargo.toml
263+
update_core_version() {
264+
local new_version=$1
265+
sed -i.bak "s/^version = \".*\"/version = \"$new_version\"/" vtagent-core/Cargo.toml
266+
rm vtagent-core/Cargo.toml.bak
267+
print_success "Updated vtagent-core version to $new_version"
268+
}
269+
262270
# Function to create git tag
263271
create_tag() {
264272
local version=$1
@@ -425,9 +433,11 @@ main() {
425433
exit 1
426434
fi
427435

428-
# Get current version
436+
# Get current versions
429437
local current_version=$(get_current_version)
430438
print_info "Current version: $current_version"
439+
local current_core_version=$(get_core_version)
440+
print_info "Current vtagent-core version: $current_core_version"
431441

432442
# Determine new version
433443
if [ -n "$increment_type" ]; then
@@ -476,6 +486,16 @@ main() {
476486
exit 0
477487
fi
478488

489+
# Prompt for core version update
490+
local core_version=""
491+
echo
492+
read -p "Enter new vtagent-core version (leave blank to skip): " core_version
493+
if [ -n "$core_version" ]; then
494+
print_info "vtagent-core will be bumped to $core_version"
495+
else
496+
print_warning "Skipping vtagent-core version bump"
497+
fi
498+
479499
# Confirm release
480500
echo
481501
print_warning "This will create a release for version $version"
@@ -497,6 +517,12 @@ main() {
497517

498518
# Update version in all package files
499519
update_version "$version"
520+
local files_to_commit="Cargo.toml"
521+
522+
if [ -n "$core_version" ]; then
523+
update_core_version "$core_version"
524+
files_to_commit="$files_to_commit vtagent-core/Cargo.toml"
525+
fi
500526

501527
# Publish to different providers
502528
if [[ "$skip_crates" != "true" ]]; then
@@ -549,4 +575,4 @@ main() {
549575
}
550576

551577
# Run main function
552-
main "$@"
578+
main "$@"

vtcode-core/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
2-
name = "vtcode-core"
3-
version = "0.1.0"
2+
name = "vtagent-core"
3+
version = "0.2.0"
44
edition = "2024"
55
authors = ["vinhnx <vinhnx@users.noreply.github.com>"]
66
description = "Core library for VTCode - a Rust-based terminal coding agent"

0 commit comments

Comments
 (0)