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
- Feature Development
- Create feature branches from
develop - Name format:
feature/feature-name -
Submit PR to
developwhen complete -
Release Preparation
- Create a release branch from
develop: - Perform final testing to ensure stability.
- Update version numbers in relevant files (e.g.,
package.json,README.md). -
Prepare release notes summarizing changes.
-
Release Deployment
- Merge the release branch into
main: - Tag the release:
- Merge the release branch back into
develop: - Delete the release branch:
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 codedevelop: Development branchfeature/*: New featuresrelease/*: Release preparationhotfix/*: Emergency fixes
Creating a Release
- 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
mainbranch to ensure the hotfix is based on the production code. - Create a new branch for the hotfix:
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:
4. Merge the Hotfix to main
- Merge the hotfix branch into
mainto apply the fix to the production code:
5. Tag the Hotfix Release
- Create a new tag for the hotfix release:
6. Merge the Hotfix to develop
- Ensure the fix is also applied to the
developbranch to keep the development codebase up to date:
7. Delete the Hotfix Branch
- Once the hotfix has been merged and tagged, delete the hotfix branch to keep the repository clean:
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