Closed tomavic closed 9 months ago
Hi @tomavic
sorry for the late reply.
TBH I have moved away from using develop
branches for my own projects. Also at work we have done so.
So I don't really have any experience with the multi-branch versioning feature of semantic-release.
Your prereleases happen in release/**
branches with prerelease tags. I'd expect the release/**
branch to be merged into master
when it's ready for production. Then the backmerge workflow for master
-> develop
should work as expected.
If you need to backmerge the release/**
branch into develop
beforehand as well, you should be able to it up like this.
{
"plugins": [
[
"@saithodev/semantic-release-backmerge",
{
"backmergeBranches": [{"from": "master", "to": "develop"}, {"from": "release/*", "to": "develop"}],
"mergeMode": "theirs", // prefer changes of "from" branch
"fastForwardMode": "ff" // upcoming feature of v3.2.0
}
]
]
}
Then, if you create prereleases via semantic-release on release/*
branches, the should be backmerged into `develop as well.
Thanks @saitho
I have already dropped the development with dev
branch workflow in my personal projects, I would really love to do this for my corporate but I am not be able to apply this change for all projects at once 😢
I will try your trick and update here. 🙏
Is there an existing issue for this?
Current Behavior
This is not a bug or issue, but I need help in order to use this plugin.
Expected Behavior
I need to use this plugin with my workflow:
master/main -> has the most stable features on production. develop -> has the most recent features that are not published yet release/** -> they are considered a dummy branches although they are dummy :)
How I start developing features and release them.
Starting from develop, a
feat
branch is taken fromdevelop
branch. I finish developing and open Pull Request and wait for it to be merged.When the testing team is ready to test my feature, I push my
develop
to a new release branch e.g.release/1.2.0
.This branch will be marked as prerelease, means that my
package.json
version will be1.2.0-1
When I repeat the same previous steps again to add more feat/fix, the prerelease number only increases.
1.2.0-2
&1.2.0-3
and so on.HERE IS THE PROBLEM:
Whenever a successful release completes on
release/**
branches, the pipelines creates a tag and commit with thatrelease/**
branch. At this moment I do manual Pull request fromrelease/**
todevelop
branch, in order to update the develop branch. WHY?Because if I didn't do that, in the next time when I push
develop
with new feat/fix to the same release, the version in the package.json will not be updated.MY Question here:
What is your recommendation in order to automate this with semantic release as much as possible??
Steps To Reproduce
..
Environment
Anything else?
No response