Commit 715d0a1
docs: add CLAUDE.md configuration file for Claude Code (#2082)
* docs: add CLAUDE.md configuration file for Claude Code
Add comprehensive CLAUDE.md documentation to guide Claude Code instances
when working with the multicluster-global-hub codebase.
The file includes:
- Architecture overview of operator, manager, and agent components
- Component responsibilities and package structure
- Build and deployment commands
- Testing workflows (unit, integration, E2E)
- Code formatting rules and dependency constraints
- Key dependencies and environment variables
This will help future Claude Code instances quickly understand the
codebase structure and be productive with common development tasks.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Meng Yan <[email protected]>
* commit skill
Signed-off-by: Meng Yan <[email protected]>
* feat: enhance globalhub-release skill with container validation and cross-platform support
- Add Docker/Podman availability verification before make update
- Add clear error messages when container engine is not available
- Add cross-platform sed syntax support (macOS and Linux)
- Remove container engine installation/initialization from script
- Update documentation with platform compatibility notes
- Improve error handling and user guidance
The skill now validates container engines upfront and provides clear
guidance without attempting automatic installation. The script automatically
detects the OS and uses appropriate sed syntax for both macOS and Linux.
Signed-off-by: Meng Yan <[email protected]>
* fix: quote shell variables to resolve SonarCloud warnings
Fixed shellcheck issues in create-release.sh script:
- Quote all variable expansions to prevent word splitting
- Quote command substitutions properly
- Quote git refs and branch names
- Quote GitHub URLs in gh commands
This resolves the 5 SonarCloud issues reported in PR #2082.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Meng Yan <[email protected]>
* shell
Signed-off-by: Meng Yan <[email protected]>
* update
Signed-off-by: Meng Yan <[email protected]>
* fix global hub
Signed-off-by: myan <[email protected]>
* fix claude 01
Signed-off-by: myan <[email protected]>
* update bundle
Signed-off-by: myan <[email protected]>
* update bundle
Signed-off-by: myan <[email protected]>
* update catalog
Signed-off-by: myan <[email protected]>
* update obs and postgres
Signed-off-by: myan <[email protected]>
* Fix shellcheck issues in cut-release scripts
Fixed 18 shellcheck warnings and style issues:
- SC2001: Use parameter expansion instead of sed for simple substitutions
- SC2034: Remove unused variables or mark them as intentionally unused
- SC2035: Use -- or ./* to prevent glob patterns from being interpreted as options
- SC2086: Add proper quoting to prevent word splitting
- SC2155: Declare and assign variables separately to avoid masking return values
All scripts now pass shellcheck validation without errors or warnings.
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Meng Yan <[email protected]>
* refactor: replace single brackets with double brackets in shell scripts
Improved shell script quality by converting [ ] to [[ ]] for all
conditional tests in the cut-release scripts, following shellcheck
SC2292 recommendations.
Changes:
- Converted all simple conditional tests from [ ] to [[ ]]
- Merged multi-condition tests (with || and &&) into single [[ ]] blocks
- Ensures safer and more feature-rich conditional expressions
Benefits:
- [[ ]] is safer and handles word splitting/globbing better
- No need to quote variables in most cases within [[ ]]
- More consistent with modern bash best practices
- Reduces potential for subtle bugs in conditional logic
All scripts have been validated with bash -n and pass syntax checks.
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Meng Yan <[email protected]>
* refactor: complete shell script quality improvements
This commit addresses all remaining SonarCloud issues in the
cut-release scripts, improving code quality and following bash
best practices.
Changes:
1. Converted ALL remaining [ ] to [[ ]] (~200+ instances)
- Simple conditions: if [ x ]; then → if [[ x ]]; then
- Combined conditions: [ x ] && [ y ] → [[ x && y ]]
- More robust and safer conditional testing
2. Redirected all error messages to stderr (~30 instances)
- All echo statements with ❌ or "Error:" now use >&2
- Proper error stream handling for better script composability
Benefits:
- [[ ]] handles edge cases better (no word splitting/globbing)
- Error messages properly separated from normal output
- Follows ShellCheck SC2292 recommendations
- Improves script reliability and maintainability
Total changes: ~458 line modifications across 7 scripts
All scripts verified with bash -n syntax checking
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Meng Yan <[email protected]>
* fix: remove duplicate stderr redirection (>&2 >&2 -> >&2)
Fixed 16 instances where >&2 was duplicated due to multiple sed passes.
All error messages now correctly redirect to stderr with single >&2.
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Meng Yan <[email protected]>
* Fix SonarCloud issues in cut-release scripts
This commit addresses remaining SonarCloud code quality issues:
1. Convert [ to [[ in command substitution contexts (5 instances)
- Safer conditional test syntax in $() expressions
- Files: 01-multicluster-global-hub.sh, 03-bundle.sh, 04-catalog.sh,
06-postgres-exporter.sh, cut-release.sh
2. Define constants for repeated string literals
- TARGET_BRANCH_PATTERN='target_branch =='
- TARGET_BRANCH_EXTRACT_PATTERN (sed extraction pattern)
- NULL_PR_VALUE='null|null'
- SEPARATOR_LINE='================================================'
- Reduces magic strings and improves maintainability
3. Redirect warning messages to stderr
- All 1 parent 9393c0a commit 715d0a1
File tree
11 files changed
+6378
-3
lines changed- .claude/skills/new-release
- scripts
11 files changed
+6378
-3
lines changedLarge diffs are not rendered by default.
Large diffs are not rendered by default.
Lines changed: 1190 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 582 additions & 0 deletions
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Lines changed: 450 additions & 0 deletions
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 45 | + | |
0 commit comments