Skip to content

Release Management Guide

Table of Contents

Introduction

This document outlines our release management process using GitHub. It provides guidelines for version control, creating releases, and maintaining release notes.

Release Process

  1. Feature Development
  2. Create feature branches from develop
  3. Name format: feature/feature-name
  4. Submit PR to develop when complete

  5. Release Preparation

  6. Create a release branch from develop:
    git checkout develop
    git pull
    git checkout -b release/vX.Y.Z
    
  7. Perform final testing to ensure stability.
  8. Update version numbers in relevant files (e.g., package.json, README.md).
  9. Prepare release notes summarizing changes.

  10. Release Deployment

  11. Merge the release branch into main:
    git checkout main
    git merge release/vX.Y.Z
    
  12. Tag the release:
    git tag -a vX.Y.Z -m "Release vX.Y.Z"
    git push origin vX.Y.Z
    
  13. Merge the release branch back into develop:
    git checkout develop
    git merge release/vX.Y.Z
    
  14. Delete the release branch:
    git branch -d release/vX.Y.Z
    

Version Numbering

We follow Semantic Versioning (SemVer): - Major Version (X): Incompatible API changes - Minor Version (Y): New features (backwards compatible) - Patch Version (Z): Bug fixes and minor updates

Example: v1.2.3

Branch Strategy

  • main: Production-ready code
  • develop: Development branch
  • feature/*: New features
  • release/*: Release preparation
  • hotfix/*: Emergency fixes

Creating a Release

  1. Create Release Branch ```bash git checkout develop git pull git checkout -b release/vX.Y.Z

Hotfix Process

Overview

The hotfix process is used to address critical issues in the production environment that require immediate attention. This process ensures that the fix is applied quickly while maintaining proper version control and branch management.


Steps for Hotfix Process

1. Create a Hotfix Branch

  • Start from the main branch to ensure the hotfix is based on the production code.
  • Create a new branch for the hotfix:
    git checkout main
    git pull
    git checkout -b hotfix/vX.Y.Z+1
    

2. Apply the Fix

  • Make the necessary changes to resolve the issue.
  • Test the fix thoroughly to ensure it resolves the problem without introducing new issues.

3. Update Version Number

  • Increment the patch version in relevant files (e.g., package.json, README.md).
  • Commit the changes:
    git add .
    git commit -m "Hotfix: Fix issue [brief description of the issue]"
    

4. Merge the Hotfix to main

  • Merge the hotfix branch into main to apply the fix to the production code:
    git checkout main
    git merge hotfix/vX.Y.Z+1
    

5. Tag the Hotfix Release

  • Create a new tag for the hotfix release:
    git tag -a vX.Y.Z+1 -m "Hotfix vX.Y.Z+1"
    git push origin vX.Y.Z+1
    

6. Merge the Hotfix to develop

  • Ensure the fix is also applied to the develop branch to keep the development codebase up to date:
    git checkout develop
    git pull
    git merge hotfix/vX.Y.Z+1
    

7. Delete the Hotfix Branch

  • Once the hotfix has been merged and tagged, delete the hotfix branch to keep the repository clean:
    git branch -d hotfix/vX.Y.Z+1
    git push origin --delete hotfix/vX.Y.Z+1
    

Notes

  • Always test the hotfix thoroughly before merging it into main.
  • Ensure that the version number is updated consistently across all relevant files.
  • Communicate the hotfix release to the team and stakeholders.

Example Commands

```bash

Step 1: Create a hotfix branch

git checkout main git pull git checkout -b hotfix/v1.2.4

Step 2: Apply the fix and commit

(Make changes to the code)

git add . git commit -m "Hotfix: Fix critical issue in production"

Step 3: Merge to main

git checkout main git merge hotfix/v1.2.4

Step 4: Tag the release

git tag -a v1.2.4 -m "Hotfix v1.2.4" git push origin v1.2.4

Step 5: Merge to develop

git checkout develop git pull git merge hotfix/v1.2.4

Step 6: Delete the hotfix branch

git branch -d hotfix/v1.2.4 git push origin --delete hotfix/v1.2.4