Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How would I make a hotfix/patch release to an older branch/release #130

Open
fritzvd opened this issue Oct 17, 2016 · 10 comments
Open

How would I make a hotfix/patch release to an older branch/release #130

fritzvd opened this issue Oct 17, 2016 · 10 comments

Comments

@fritzvd
Copy link

fritzvd commented Oct 17, 2016

Hi,

Is it possible to be able to release from a fixes/hotfix/stable whatever branch?

E.g. master is ahead at 4.3.1. But I'm looking to release a security patch to 2.0.1 from a release2.0 branch for it to become 2.0.2.

How would I go about that in standard-version? Or is that scenario not supported?

Fritz

P.S. I've been looking through the issues, and the most similar ones to mine are those about named versions (#83, #84). But that's not what I mean.

@stevemao
Copy link
Member

You could switch to release2.0 branch, do commits on the branch and release. It should generate the right changelog. Merging it back to master might be a bit tricky I think. You'd need to resolve the conflicts in CHANGELOG.md
linking: conventional-changelog-archived-repos/git-semver-tags#10 (comment)

Am I missing anything?

@fritzvd
Copy link
Author

fritzvd commented Oct 18, 2016

Thanks @stevemao. That makes sense.

@stevemao
Copy link
Member

@fritzvd does it work for you? Is this resolved?

@Tapppi Tapppi added the question label Dec 2, 2016
@Tapppi
Copy link
Member

Tapppi commented Dec 2, 2016

This should work at the moment as is, right @fritzvd? I think the right workflow in this situation is to:

  • make the fix on a separate branch e.g. hotfix-crash-on-startup-23
  • merge this to the earlier release2.0 branch
  • run standard-version which should pick up only the tags on that branch, and release a correct CHANGELOG.md and version.
  • if possible merge the hotfix branch to your other release (master/release2.1/release3.0 etc.) or rebase and ff-merge and repeat the standard-version process.

This avoids conflict between changelogs etc. as the same hotfix is just applied to multiple branches of release. IMO that is the correct workflow and should be supported by standard-version explicitly (right now this seems to be pretty obtuse and implicitly supported). As explaine in conventional-changelog-archived-repos/git-semver-tags#10 (comment) having that pull requests result as default in standard-version would break this workflow with no alternative I can see? As such I still am of the opinion that the functionality should be in git-semver-tags as an option and disabled here until other concerns such as this issue are resolved.

Unless there is a dissenting opinion I think this can be closed as soon as someone verifies that my assumption about this working right now is correct?

/CC @bcoe @nexdrew @stevemao

@Tapppi
Copy link
Member

Tapppi commented Dec 2, 2016

BTW we should probably document the working workflow. so:

  • release from master and if you want individual release2etc. branches
  • Do not cut releases from other branches, as they will screw up your history (if this is mandatory, you need to somehow get to git-semver-tags and enable the "all branches tags" option).
  • Use the feat hotfix git flow for merging to multiple release branches and cut releases from there to ensure intact CHANGELOG and versioning.

Sorry for the walls of text but just realised that this isn't as explicit as I thought it would be. It just happened to fit into my personal and our work workflow perfectly 😅

@fritzvd
Copy link
Author

fritzvd commented Dec 3, 2016 via email

@bcoe
Copy link
Member

bcoe commented Dec 3, 2016

@Tapppi @fritzvd want to perhaps take a stab at editing the README a bit to reflect this?

@fritzvd
Copy link
Author

fritzvd commented Dec 4, 2016 via email

@hjylewis
Copy link

Sorry if this is already answered (I had a hard time following the git-semver-tags stuff), but is there an easy way of merging the changelog entries from the older release branch back into the master changelog?

For context, I added a patch to an older release and now I want that release to be documented in the master changelog. It's in the changelog in the release/x branch but not in master.

@bcoe
Copy link
Member

bcoe commented Aug 20, 2019

@Tapppi I don't suppose you could be enlisted to add your notes to the README, I never feel like I fully followed what might be an appropriate workflow for hotfixes either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants