-
Notifications
You must be signed in to change notification settings - Fork 6
fix(release): include aidevops.sh in version updates #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -395,6 +395,16 @@ validate_version_consistency() { | |
| fi | ||
| fi | ||
|
|
||
| # Check aidevops.sh CLI | ||
| if [[ -f "$REPO_ROOT/aidevops.sh" ]]; then | ||
| if grep -q "# Version: $expected_version" "$REPO_ROOT/aidevops.sh"; then | ||
| print_success "aidevops.sh: $expected_version ✓" | ||
| else | ||
| print_error "aidevops.sh does not contain version $expected_version" | ||
| errors=$((errors + 1)) | ||
| fi | ||
| fi | ||
|
Comment on lines
+399
to
+406
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This block correctly validates the version in For example, you could create a function like this: _validate_file_version() {
local file_path="$1"
local grep_pattern="$2"
local file_desc="$3"
local expected_version="$4"
if [[ -f "$file_path" ]]; then
if grep -q "$grep_pattern" "$file_path"; then
print_success "$file_desc: $expected_version ✓"
else
print_error "$file_desc does not contain version $expected_version"
errors=$((errors + 1))
fi
fi
}Then you could call it for each file: _validate_file_version "$REPO_ROOT/aidevops.sh" "# Version: $expected_version" "aidevops.sh" "$expected_version"
_validate_file_version "$REPO_ROOT/.claude-plugin/marketplace.json" '"version": "$expected_version"' "Claude Code plugin" "$expected_version"This would make the |
||
|
|
||
| # Check Claude Code plugin marketplace.json | ||
| if [[ -f "$REPO_ROOT/.claude-plugin/marketplace.json" ]]; then | ||
| if grep -q "\"version\": \"$expected_version\"" "$REPO_ROOT/.claude-plugin/marketplace.json"; then | ||
|
|
@@ -445,6 +455,12 @@ update_version_in_files() { | |
| print_success "Updated setup.sh" | ||
| fi | ||
|
|
||
| # Update aidevops.sh CLI if it exists | ||
| if [[ -f "$REPO_ROOT/aidevops.sh" ]]; then | ||
| sed -i '' "s/# Version: .*/# Version: $new_version/" "$REPO_ROOT/aidevops.sh" | ||
| print_success "Updated aidevops.sh" | ||
| fi | ||
|
Comment on lines
+459
to
+462
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This block correctly updates the version in For example: _update_file_version() {
local file_path="$1"
local sed_expr="$2"
local file_desc="$3"
if [[ -f "$file_path" ]]; then
sed -i '' "$sed_expr" "$file_path"
print_success "Updated $file_desc"
fi
}And then call it like this: _update_file_version "$REPO_ROOT/aidevops.sh" "s/# Version: .*/# Version: $new_version/" "aidevops.sh"This would simplify the |
||
|
|
||
| # Update README version badge | ||
| if [[ -f "$REPO_ROOT/README.md" ]]; then | ||
| # Use more robust regex pattern for version numbers (handles single and multi-digit) | ||
|
|
@@ -498,7 +514,7 @@ commit_version_changes() { | |
| print_info "Committing version changes..." | ||
|
|
||
| # Stage all version-related files (including CHANGELOG.md and Claude plugin) | ||
| git add VERSION package.json README.md setup.sh sonar-project.properties CHANGELOG.md .claude-plugin/marketplace.json 2>/dev/null | ||
| git add VERSION package.json README.md setup.sh aidevops.sh sonar-project.properties CHANGELOG.md .claude-plugin/marketplace.json 2>/dev/null | ||
|
|
||
| # Check if there are changes to commit | ||
| if git diff --cached --quiet; then | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grep -qtreats.as “any character”, so version strings like2.54.0can match unintended text; considergrep -Fqfor a fixed-string match (also applies to the other version consistency checks).🤖 Was this useful? React with 👍 or 👎