Last Updated: 2025-11-25
Applies To: Release automation scripts (v0.6.0+)
Related: Release Automation System, Contributing Guidelines
| Issue | Solution | Section |
|---|---|---|
| Bash version error | Install Bash 4.0+ | Bash Version Issues |
| Working directory not clean | Commit or stash changes | Git Issues |
| RubyGems authentication failed | Configure credentials | RubyGems Issues |
| Changelog generation fails | Check commit format | Changelog Issues |
| Docker container errors | Rebuild containers | Docker Issues |
✅ macOS
✅ Linux
✅ Windows
| Software | Minimum Version | Recommended | Notes |
|---|---|---|---|
| Bash | 4.0 | 5.3+ | Required for associative arrays |
| Docker | 20.10 | 24.0+ | For containerized development |
| Git | 2.30 | 2.43+ | For version control |
| Ruby | 3.0 | 3.2+ | For gem building (optional with Docker) |
| Bundler | 2.0 | 2.5+ | For dependency management |
Error Message:
[ERROR] This script requires Bash 4.0 or higher (current: 3.2.57)
[INFO] On macOS, install via: brew install bash
[INFO] Then run with: /opt/homebrew/bin/bash scripts/release
Cause: macOS ships with Bash 3.2 (released 2006) due to GPL licensing. The release automation uses associative arrays, which require Bash 4.0+.
Solutions:
Option 1: Install Modern Bash (Recommended)
# Install Bash 5 via Homebrew
brew install bash
# Verify installation
/opt/homebrew/bin/bash --version
# Should show: GNU bash, version 5.3.3 or higher
# Run release command with Bash 5
/opt/homebrew/bin/bash scripts/release patch --dry-run
Option 2: Add to PATH
# Add to ~/.zshrc or ~/.bashrc
export PATH="/opt/homebrew/bin:$PATH"
# Reload shell
source ~/.zshrc
# Verify (should show Bash 5)
bash --version
# Now can run normally
./scripts/release patch --dry-run
Option 3: Create Alias
# Add to ~/.zshrc
alias release='/opt/homebrew/bin/bash scripts/release'
alias build='/opt/homebrew/bin/bash scripts/build'
# Usage
release patch --dry-run
build --dry-run
Error Message:
/Users/bamr87/github/zer0-mistakes/scripts/lib/changelog.sh: line 115: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
Cause: Script running with Bash 3.2 instead of Bash 4.0+.
Solution: Same as above - install and use Bash 5.
Error Message:
[ERROR] Working directory is not clean. Please commit or stash changes first.
Cause: You have uncommitted changes in your working directory. The release process requires a clean state to track changes accurately.
Solutions:
Option 1: Commit Changes
# Review changes
git status
# Stage and commit
git add .
git commit -m "chore: prepare for release"
# Run release
/opt/homebrew/bin/bash scripts/release patch
Option 2: Stash Changes
# Stash uncommitted changes
git stash push -u -m "WIP: temp stash for release"
# Run release
/opt/homebrew/bin/bash scripts/release patch
# Restore changes
git stash pop
Option 3: Use Dry-Run Mode
# If just testing, use dry-run (still requires clean directory)
git stash
/opt/homebrew/bin/bash scripts/release patch --dry-run
git stash pop
Error Message:
[WARN] No commits found since v0.6.0
Cause: No new commits since the last release tag.
Solutions:
If this is expected:
# This is just a warning - release will continue
# But changelog will be empty
If you expect commits:
# Check commit history
git log --oneline v0.6.0..HEAD
# If commits exist, check conventional commit format
git log --pretty=format:"%s" v0.6.0..HEAD
Error Message:
[ERROR] RubyGems credentials not configured
Cause: No RubyGems API key found in ~/.gem/credentials.
Solutions:
Option 1: Configure API Key
# Get API key from https://rubygems.org/profile/edit
# Then configure:
gem signin
# Or manually:
mkdir -p ~/.gem
cat > ~/.gem/credentials << 'EOF'
---
:rubygems_api_key: YOUR_API_KEY_HERE
EOF
chmod 600 ~/.gem/credentials
Option 2: Skip Publishing (for testing)
# Build and test without publishing
/opt/homebrew/bin/bash scripts/release patch --skip-publish --no-github-release
Cause: Invalid or expired API key, or insufficient permissions.
Solutions:
# Re-authenticate with RubyGems
gem signin
# Verify credentials
cat ~/.gem/credentials
# Check gem ownership
gem owner jekyll-theme-zer0
# If not an owner, request access from bamr87
Cause: Commits don’t follow conventional commit format.
Conventional Commit Format:
<type>(<scope>): <subject>
<body>
<footer>
Valid Types:
feat: - New features → Added sectionfix: - Bug fixes → Fixed sectiondocs: - Documentation → Changed sectionrefactor: - Code refactoring → Changed sectionstyle: - Code style → Changed sectiontest: - Tests → Other sectionchore: - Maintenance → Other sectionperf: - Performance → Changed sectionci: - CI/CD → Other sectionSolutions:
Check recent commits:
# View commits since last tag
git log --oneline v0.6.0..HEAD
# Check commit format
git log --pretty=format:"%s" v0.6.0..HEAD
Amend last commit:
# If last commit needs fixing
git commit --amend -m "feat: add new feature description"
Rewrite commit history (advanced):
# Interactive rebase to fix multiple commits
git rebase -i v0.6.0
# Change 'pick' to 'reword' for commits to fix
# Save and update commit messages
Cause: The changelog generator filters these out automatically, but you might see them in raw git log.
Expected Behavior: Commits matching these patterns are automatically excluded:
chore: bump versionchore: release versionchore: update changelogCHANGELOG.md, lib/*/version.rb, package.jsonNo action needed - this is working as designed.
Error Message:
Cannot connect to the Docker daemon
Solutions:
# macOS: Start Docker Desktop
open /Applications/Docker.app
# Linux: Start Docker service
sudo systemctl start docker
sudo systemctl enable docker
# Verify Docker is running
docker ps
Error Message:
Error: bind: address already in use
Solutions:
Option 1: Stop conflicting service
# Find what's using port 4000
lsof -i :4000
# Kill the process
kill -9 <PID>
# Restart Docker Compose
docker-compose up
Option 2: Use different port
# Edit docker-compose.yml
ports:
- "4001:4000"
# Or use environment variable
PORT=4001 docker-compose up
Cause: Architecture mismatch between Apple Silicon (ARM64) and container images (AMD64).
Solution:
Our docker-compose.yml already includes:
platform: linux/amd64
If still having issues:
# Rebuild with platform flag
docker-compose down
docker-compose build --platform linux/amd64
docker-compose up
Error Message:
[ERROR] Some tests failed
[INFO] Use --skip-tests to bypass this check
Cause: Test failures block the release by default (good!).
Solutions:
Option 1: Fix tests (recommended)
# Run tests to see failures
./test/test_runner.sh --verbose
# Fix issues
# Re-run tests
./test/test_runner.sh
# Then release
/opt/homebrew/bin/bash scripts/release patch
Option 2: Skip tests (not recommended)
# Only for emergency hotfixes
/opt/homebrew/bin/bash scripts/release patch --skip-tests
Cause: Integration issues between components.
Solutions:
# Run specific test suite
./test/test_core.sh
./test/test_deployment.sh
./test/test_quality.sh
# Check for environment issues
./test/test_runner.sh --verbose
# Verify all dependencies
bundle install
Cause: Tasks not properly loaded or workspace not configured.
Solutions:
# Reload VS Code window
# Cmd+Shift+P → "Developer: Reload Window"
# Verify tasks.json exists
ls -la .vscode/tasks.json
# Manually run task command
/opt/homebrew/bin/bash scripts/release --help
Cause: Tasks pointing to deprecated wrapper scripts.
Solutions:
# Check what task executes
cat .vscode/tasks.json | grep "command.*release"
# Should show: ${workspaceFolder}/scripts/release
# NOT: ${workspaceFolder}/scripts/gem-publish.sh
# If incorrect, update tasks.json or pull latest:
git pull origin main .vscode/tasks.json
Cause: Large commit history or complex repository.
Expected Time:
Solutions:
If unreasonably slow:
# Check commit count since last tag
git rev-list --count v0.6.0..HEAD
# Use shallow clone for testing
git clone --depth 50 <repo-url>
# Or limit changelog range
# (modify scripts/lib/changelog.sh if needed)
Typical Times:
Total Expected Time: 2-5 minutes
If significantly slower:
# Run with timing info
time /opt/homebrew/bin/bash scripts/release patch --dry-run
# Check for network issues
ping rubygems.org
ping github.com
# Use local testing
./scripts/release patch --skip-publish --no-github-release
--help - See all available options# System information
bash --version
docker --version
git --version
ruby --version
# Environment check
./scripts/release --help
./test/test_runner.sh
# Git status
git status
git log --oneline -10
# Docker status
docker ps
docker-compose config
Include in your issue:
## Environment
- OS: macOS 14.5 (Sonoma)
- Bash version: 5.3.3
- Docker version: 24.0.6
- Ruby version: 3.2.2
## Steps to Reproduce
1. Run command: /opt/homebrew/bin/bash scripts/release patch
2. See error at step 3 (changelog generation)
## Expected Behavior
Should generate changelog with recent commits
## Actual Behavior
Error: declare: -A: invalid option
## Additional Context
```bash
$ git log --oneline v0.6.0..HEAD
32755cd refactor: implement modular release automation
b7ad237 Update README.md for version 0.6.0
```
## Advanced Topics
### Custom Changelog Categories
If you need custom commit categorization, modify `scripts/lib/changelog.sh`:
```bash
# Function: categorize_commit
# Add custom patterns:
elif echo "$subject" | grep -qiE "^(breaking|major):"; then
echo "breaking"
# Enable debug output
export DEBUG=true
/opt/homebrew/bin/bash scripts/release patch --dry-run
# Or use bash debug mode
/opt/homebrew/bin/bash -x scripts/release patch --dry-run 2>&1 | less
# Check specific library
/opt/homebrew/bin/bash scripts/test/lib/run_tests.sh
For GitHub Actions or other CI systems:
- name: Install Bash 5
run: |
if [[ "$OSTYPE" == "darwin"* ]]; then
brew install bash
fi
- name: Release
run: |
/opt/homebrew/bin/bash scripts/release patch --non-interactive
env:
RUBYGEMS_API_KEY: $
Need more help? Open an issue: https://github.com/bamr87/zer0-mistakes/issues/new