Skip to content

AltafEmpaxis/VersionManagement

Repository files navigation

Repository files navigation

Version Management System

A robust version management system for tracking software releases across different environments.

GitHub Repository License Portfolio Deployment

πŸ“‹ Table of Contents

✨ Features

  • Environment-specific version tracking
  • Automated version increments
  • Release history logging
  • Version display component

πŸš€ Getting Started

  1. Installation

    # Clone the repository
    git clone <repository-url>
    cd your-project-name
    
    # Install dependencies
    npm install
    npm run dev
  2. Initial Setup

    # Initialize version system
    npm run clear:versions
    
    # Start development
    npm run start:dev

πŸ“ Project Structure

project-root/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ versionData.json     # Version tracking data
β”‚   └── ...
β”œβ”€β”€ scripts/
β”‚   └── manageVersion.js     # Version management script
β”œβ”€β”€ RELEASELOGS.md          # Automated release logs
└── package.json            # NPM scripts and dependencies

πŸ“ Version Management

Version Format

MAJOR.MINOR.PATCH[-ENVIRONMENT]

Examples:
1.0.0-dev    # Development version
1.1.0-qa     # QA version
2.0.0-uat    # UAT version
1.0.1        # Production version

Version Types

  • Major (x.0.0): Breaking changes
  • Minor (0.x.0): New features (backwards compatible)
  • Patch (0.0.x): Bug fixes
  • Hotfix: Emergency production fixes

🌐 Environment Management

Development (DEV)

# Start development server
npm run start:dev

# Update version
npm run version:dev patch "Added login feature"
npm run version:dev minor "New feature set"
npm run version:dev major "Breaking API changes"

# Build for development
npm run build:dev

Quality Assurance (QA)

# Start QA server
npm run start:qa

# Update QA version
npm run version:qa patch "Fixed login bugs"
npm run version:qa minor "Feature validation"

# Build for QA
npm run build:qa

User Acceptance Testing (UAT)

# Start UAT server
npm run start:uat

# Update UAT version (requires message)
npm run version:uat patch "Client feedback fixes"
npm run version:uat minor "New features for review"

# Build for UAT
npm run build:uat

Production (PROD)

# Start production server
npm run start:prod

# Release commands (requires message)
npm run release:patch "Bug fixes"
npm run release:minor "New features"
npm run release:major "Breaking changes"
npm run release:hotfix "Emergency fix"

npm run version:prod major "Bug fix"

# Build for production
npm run build:prod

πŸ”„ Release Process

  1. Development Phase

    # Start development
    npm run start:dev
    
    # Make changes and update version
    npm run version:dev minor "New feature"
    
    # Build and verify
    npm run build:dev
  2. QA Phase

    # Update QA version
    npm run version:qa minor "Feature testing"
    
    # Build for QA
    npm run build:qa
  3. UAT Phase

    # Update UAT version
    npm run version:uat minor "Client review"
    
    # Build for UAT
    npm run build:uat
  4. Production Release

    # Release to production
    npm run release:minor "New feature release"
    
    # Build for production
    npm run build:prod

πŸ’» Commands Reference

Version Commands

# Check versions
npm run version:dev          # Show DEV version
npm run version:qa           # Show QA version
npm run version:uat          # Show UAT version
npm run version:prod         # Show PROD version

# Update versions
npm run version:dev [type] "message"  # Update DEV
npm run version:qa [type] "message"   # Update QA
npm run version:uat [type] "message"  # Update UAT
npm run release:[type] "message"      # Update PROD

Build Commands

npm run build:dev           # Build DEV
npm run build:qa            # Build QA
npm run build:uat           # Build UAT
npm run build:prod          # Build PROD

Preview Commands

npm run preview:dev         # Preview DEV build
npm run preview:qa          # Preview QA build
npm run preview:uat         # Preview UAT build
npm run preview:prod        # Preview PROD build

Utility Commands

npm run lint               # Run ESLint
npm run lint:fix           # Fix ESLint issues
npm run prettier           # Format code
npm run clear:versions     # Reset version system

πŸ’‘ Examples

Feature Development Workflow

# Start new feature
npm run version:dev minor "User authentication"
# Version: 1.1.0-dev

# Fix issues
npm run version:dev patch "Login validation fix"
# Version: 1.1.1-dev

# Move to QA
npm run version:qa minor "Auth ready for testing"
# Version: 1.1.0-qa

# UAT Testing
npm run version:uat minor "Auth for client review"
# Version: 1.1.0-uat

# Production Release
npm run release:minor "User authentication feature"
# Version: 1.1.0

Hotfix Workflow

# Emergency production fix
npm run release:hotfix "Critical security fix"
# Version: 1.1.1

# Sync environments
npm run version:dev patch "Security fix sync"
npm run version:qa patch "Security fix sync"
npm run version:uat patch "Security fix sync"

πŸ”§ Troubleshooting

Common Issues

  1. Version Not Updating

    • Check current version: npm run version:[env]
    • Verify environment name
    • Ensure message is provided for UAT/PROD
  2. Build Errors

    • Run npm run clear:versions to reset
    • Check environment configuration
    • Verify build dependencies
  3. Release Issues

    • Ensure proper version type (major/minor/patch)
    • Check required message for production
    • Verify git configuration for tags

Version Reset

If you need to reset the version system:

npm run clear:versions

# Output:
βœ… Version System Reset Complete
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
β€’ Version Data: Reset to 0.0.0
β€’ Release Logs: Reinitialized
β€’ Timestamp: [current-time]

πŸ“ Release Logs

View our detailed release history in our Release Logs file.

Release Logs

The release logs include:

  • Version updates across all environments
  • Detailed changelog entries
  • Release timestamps and authors
  • System-wide updates

Latest Release

Version: 0.0.0
Released: 2024-02-14
Type: system

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

License: MIT

πŸ”— Links