Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Pre-requiste 

To create a Git tag for any repository, maintainer-level access is required.
If you do not have the necessary permissions, a CMFSUPPORT ticket must be raised to obtain approval from the respective component owner.

Additionally, the repository must be configured to support git-flow.
If it is not already set up, a separate CMFSUPPORT ticket should be raised to request git-flow configuration for that specific repository.

Reference ticket: 
Jira
serverJIRA
serverId11deff04-0380-3a3d-a916-0849d4e573f7
keyCMFSUPPORT-2862

Getting Started with git flow and auto-changelog Installation and Usage Overview

Git-Flow:

git-flow is a set of Git extensions that provide high-level repository operations based on Vincent Driessen’s branching model. It is particularly useful for maintaining older releases and managing structured development workflows.

Installation:

Code Block
languagec#
themeDJango
titleInstalling git flow package
collapsetrue
sudo apt-get install git-flow

...

Auto-

...

Changelog:

auto-changelog is a command-line tool that generates changelogs automatically from Git tags and commit history.

Installation: (if npm package is not present by default, need to install)

Code Block
languagec#
themeDJango
titleInsalling auto-changelog package
collapsetrue
npm install -g auto-changelog 

...

Once the component development process is complete, the component release process can begin. Follow the steps below to tag the repository appropriately:

Code Block
collapse
languagec#
themeDJango
titlesteps for git tagging for a componenttrue
# check which branch is HEAD
git branch -a 
# if HEAD is set to origin/develop (remotes/origin/HEAD -> origin/develop) run
git fetch origin main:main

# initialize repo and git flow (once per clone)
git flow init -d

# create your release from develop
git flow release start <release number> <optional develop SHA1>
git flow release start 1.0.0

git add/commit # bug fixes, release stabilisation (only if applicable)

# create changelog and commit
auto-changelog -v <release version>
auto-changelog -v 1.0.0
git add CHANGELOG.md
git commit CHANGELOG.md

# publish the release branch  
git flow release publish <release version>
git flow release publish 1.0.0

# at this stage please create Pull request for both develop and main branches from UI
# note the update on develop will only be CHANGELOG.md, main will be changelog and other changes
# do NOT merge from UI !!

# finish the release: this push changes to main & develop, creates a TAG, deletes the release branch
git flow release finish <release version>
git flow release finish 1.0.0

# push the changes and TAGS to origin
git push origin main
git push origin develop
git push origin --tags

...

For Example:
Repository for rdk-speedtest-cli - https://github.com/rdkcentral/rdk-speedtest-cli/

Note: Although the example shown here uses a forked version of the broadbandrdk-speedtest-utilscli repository, all actual development and tagging steps must steps must be performed using the original rdkcentral repository. Here forked repository is used for demonstration only, not for official tagging or release activities.

Git Clone:

Code Block
languagec#
themeDJango
titlegit cloning linenumberstrue
collapsetrue
chtsl00388@chtsl00388-IdeaPad-5-14ITL05:~$ git clone  https://github.com/ksaipr036/rdk-speedtest-cli.git 
Cloning into 'rdk-speedtest-cli'...
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 22 (delta 6), reused 19 (delta 3), pack-reused 0 (from 0)
Receiving objects: 100% (22/22), 16.12 KiB | 8.06 MiB/s, done.
Resolving deltas: 100% (6/6), done.
chtsl00388@chtsl00388-IdeaPad-5-14ITL05:~$ 

...