Skip to content

Add version update script - #4

Merged
hacker-cb merged 8 commits into
masterfrom
version-update-script
Oct 17, 2025
Merged

Add version update script#4
hacker-cb merged 8 commits into
masterfrom
version-update-script

Conversation

@hacker-cb

Copy link
Copy Markdown
Contributor

No description provided.

Hacker-CB added 5 commits October 17, 2025 07:23
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 79c60e56-af99-4011-a509-f8e82de07405
Replit-Commit-Checkpoint-Type: full_checkpoint
Creates a shell script that prompts for a new version, updates version information across multiple files (CMakeLists.txt, __init__.py, Dockerfile), and creates a corresponding git tag.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 79c60e56-af99-4011-a509-f8e82de07405
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Create a bash script that prompts the user for a new version number, updates the package.json version, commits the change, and creates a new git tag.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 79c60e56-af99-4011-a509-f8e82de07405
Replit-Commit-Checkpoint-Type: full_checkpoint
Adds a script to automate the version bumping process, including staging changes, committing with a version message, and updating existing scripts.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 79c60e56-af99-4011-a509-f8e82de07405
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
This commit introduces a new script designed to streamline the process of version bumping in conjunction with Git commits, likely for release management.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 79c60e56-af99-4011-a509-f8e82de07405
Replit-Commit-Checkpoint-Type: full_checkpoint
Copilot AI review requested due to automatic review settings October 17, 2025 07:51
@github-actions

Copy link
Copy Markdown

Coverage after merging version-update-script into master will be

74.53%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive bash script for automating version updates across the LitePB project and updates the project version from 1.0.0 to 1.0.1 as a demonstration.

  • Introduces a new automated version update script with validation and git integration
  • Updates project version from 1.0.0 to 1.0.1 across all version files
  • Implements cross-platform sed compatibility and user confirmation prompts

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
scripts/update_version.sh New comprehensive script for automating version updates with validation, file updates, and git operations
generator/init.py Version bump from 1.0.0 to 1.0.1
docker/Dockerfile Version bump from 1.0.0 to 1.0.1 in container label
cmake/CMakeLists.txt Version bump from 1.0.0 to 1.0.1 in project configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread scripts/update_version.sh Outdated
Comment thread scripts/update_version.sh

# Function to extract current version from CMakeLists.txt
get_current_version() {
grep 'VERSION' "$CMAKE_FILE" | grep -E '[0-9]+\.[0-9]+\.[0-9]+' | sed -E 's/.*VERSION ([0-9]+\.[0-9]+\.[0-9]+).*/\1/' | head -1

Copilot AI Oct 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version extraction pattern is too broad and could extract version numbers from comments or other contexts. It should specifically target the project() VERSION line to ensure accuracy.

Suggested change
grep 'VERSION' "$CMAKE_FILE" | grep -E '[0-9]+\.[0-9]+\.[0-9]+' | sed -E 's/.*VERSION ([0-9]+\.[0-9]+\.[0-9]+).*/\1/' | head -1
grep -E '^project\(.*VERSION [0-9]+\.[0-9]+\.[0-9]+' "$CMAKE_FILE" | sed -E 's/.*VERSION ([0-9]+\.[0-9]+\.[0-9]+).*/\1/' | head -1

Copilot uses AI. Check for mistakes.
Comment thread scripts/update_version.sh Outdated
echo " ✓ Updated $CMAKE_FILE"

# Update Python __init__.py
sed "s/__version__ = '${old_version}'/__version__ = '${new_version}'/" "$PYTHON_FILE" > "${PYTHON_FILE}.tmp" && mv "${PYTHON_FILE}.tmp" "$PYTHON_FILE"

Copilot AI Oct 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sed replacement patterns contain special characters that could cause issues if the version contains regex metacharacters. Consider escaping the version strings or using a more robust replacement method.

Copilot uses AI. Check for mistakes.
Comment thread scripts/update_version.sh Outdated
cursor[bot]

This comment was marked as outdated.

hacker-cb and others added 2 commits October 17, 2025 10:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Coverage after merging version-update-script into master will be

74.53%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines

1 similar comment
@github-actions

Copy link
Copy Markdown

Coverage after merging version-update-script into master will be

74.53%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines

cursor[bot]

This comment was marked as outdated.

@github-actions

Copy link
Copy Markdown

Coverage after merging version-update-script into master will be

74.53%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines

@hacker-cb
hacker-cb merged commit 7cdb2aa into master Oct 17, 2025
9 checks passed
@hacker-cb
hacker-cb deleted the version-update-script branch October 17, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants