简体   繁体   中英

Automatically syncing develop with master on merge

I'm currently working on a project that involves continuous integration and deployment. We work using the methods of Git Flow, where a feature/* branch is created to work on functionality, this is then merged into develop after a merge request has been peer-reviewed. Once we want to release a new version, we create a release/xyz branch, and once that has been approved, we merge to master .

The issue here is, that the current project requires each new build (so each commit / merge on a release/xyz or master branch) to have a unique build number by incrementing the build number. This process works perfectly fine, except for that once something becomes merged to master, we don't merge it back into develop automatically, which means that eventually, we'll have the same build number for similar versions.

We're using GitLab Enterprise, together with GitLab Runners, to run our build process and increment the build number, then commit it back with a [skip ci] tag in the commit message to prevent a new build from being started. I'm familiar with the most regular git commands, but I'm not sure how I could automate the process of merging back the changes from the master branch back into develop , without manually having to merge or create a merge request, and preferably, without cluttering the entire commit history with version bump commits.

What are my options here?

If you can split the version in a separate file you could keep it in master only. For the release candidates you could build the snapshot. Otherwise you will have to merge matter back to develop...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM