Home > Mobile >  How to upgrade version number for previous release with semantic-release
How to upgrade version number for previous release with semantic-release

Time:07-30

Currently, I have a package with currnet version 2.0.1, i want to release fix for previous version i.e v1.0.1, how to achieve this in github, should i checkout to v1.0.1 branch and then create fix and merge it to master ? Are there any steps which we need to follow ? I know that i cant merge branch from v1 into master since my master is on v2, so not sure how to achieve this.

CodePudding user response:

You'll make a new branch from the latest v1 release. Your v1 and v2 are going to diverge. v1 and master (v2) will remain separate.

  • Checkout v1.0.1
  • Make a branch, name it something like v1

Now work on v1 and tag releases as if it were master.

Do not merge v1 into master. Do not merge master into v1. These are now two active release branches.

If you want bug fixes from v2, use git-cherry-pick to copy individual commits from master to v1.

  • Related