Core Utility Scripts

Essential scripts that provide foundational functionality across all IT-Journey projects.

Scripts in this Directory

version-manager.sh

Unified version management script that handles versioning across multiple file types and project formats.

Capabilities:

Usage Examples:

# Increment patch version across all files
./version-manager.sh patch

# Update only markdown frontmatter versions for staged files
./version-manager.sh frontmatter

# Preview major version bump without changes
./version-manager.sh major --dry-run

# Auto-commit version changes
./version-manager.sh minor --auto-commit

Supported File Types:

environment-setup.sh

Comprehensive development environment setup script with intelligent project type detection.

Capabilities:

Usage Examples:

# Auto-detect project type and setup environment
./environment-setup.sh

# Interactive setup with user prompts
./environment-setup.sh --interactive

# Jekyll-specific environment setup
./environment-setup.sh --project-type jekyll

# Preview what would be installed
./environment-setup.sh --dry-run

Supported Project Types:

Design Principles

Design for Failure (DFF)

Don’t Repeat Yourself (DRY)

Keep It Simple (KIS)

Collaboration (COLAB)

Integration with Other Scripts

Core scripts are designed to be used by other scripts in the IT-Journey ecosystem:

# Build scripts can use version manager
./scripts/development/build/build-site.sh

# Deployment scripts can verify environment
./scripts/deployment/update-settings.sh

Error Handling

All core scripts implement comprehensive error handling:

  1. Input Validation: Check arguments and environment
  2. Dependency Verification: Ensure required tools are available
  3. State Validation: Verify system state before making changes
  4. Rollback Support: Provide mechanisms to undo failed operations
  5. Meaningful Messages: Clear error descriptions with suggested fixes

Configuration

Core scripts respect environment variables and project-specific configurations:

Environment Variables

Project Detection

Scripts automatically detect project types based on file presence:

Troubleshooting

Common Issues

  1. Permission Denied
    chmod +x scripts/core/*.sh
    
  2. Missing Dependencies
    ./environment-setup.sh --interactive
    
  3. Git Not Configured
    ./environment-setup.sh --interactive
    

Debug Mode

Enable verbose output for debugging:

./version-manager.sh --help
./environment-setup.sh --dry-run

Contributing

When adding new core scripts:

  1. Follow the standardized file header format
  2. Implement comprehensive error handling
  3. Include help messages and examples
  4. Add dry-run mode for testing
  5. Update this README with documentation