How to handle version config files changes during the automatic cascade merge?

I'm trying to configure Stash to perform the automatic merges from the release branches when a Pull Request gets merged. The functionality seems nice, but we're stuck in this problem:

The release branch needs some configuration files to be changed every time a build is "released", to reflect the new build version. Therefore we have some automatic commits when a build is released. This will lead to conflicts when merging, though the conflicts are easy to solve since for those specific files the strategy should be "ours". In other words, these files should be ignored during the merge, since they don't apply to the target branch. But how can I configure the automatic merge in Stash to deal with these cases?

Otherwise I don't see how we can benefit from this feature, since this is a common practice to have some files changed related with versioning, in different branches.

1 answer

Silvestre,

You may want to take a look at this paid add-on: ScriptRunner for Bitbucket Server / Stash.

The relevant section in the documentation shows how you can set conditions for an auto merge.

I hope you find it useful.

 

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

640 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot