I'm using GitLab CE with Maven project, and try to follow the Environment branches with GitLab flow and The 11 Rules of GitLab Flow
The step for releasing is as the following: -
feature +--- +--- +--- / \ / \ / \ master + ---- + ---- + ---- + ---- + \ \ qa-tmp (chage ver to RC) +--- + --- \ \ qa + ------------------- + ---------- + (v1.0-RC1) (v1.1-RC1) \ \ prod-tmp (chage ver to final) +--- + --- \ \ prod + ------------------------ + ------------ + (v1.0) (v1.1) - Create a
featurebranch and merge into themasterso that it is ready to be released Create the
qa-tmpbranch e.g.release-v1.0-RC1frommaster2.1 Update the pom version to
1.0-RC12.2 Merge the
release-v1.0-RC1toqa2.3 Tag
v1.0-RC1from mergedqabranch.When it pass the QA, create
prod-tmpbranch e.g.release-v1.0from tagv1.0-RC13.1 Update the pom version to
1.03.2 Merge the
release-v1.0to prod3.3 Tag
v1.0from mergedprodbranch3.4 Bump
masterto version1.1-SNAPSHOTDevelop the version
1.1-SNAPSHOTin the features & master when it is ready to be released, repeat the step 2 and 3.
The trouble is since the version is changed during merging the qa branch and prod branch, when I perform a next release there is a merge conflict for the version inside the pom. This cause me to resolve this conflict manually.
I'm not sure if I'm doing something wrong or misunderstanding about the releasing procedure or not.
Furthermore, do we have any practice to make this releasing to be an automation, e.g. via script?
Could you please help to advise?