Skip to content

Commit 51e6770

Browse files
committed
#153 support legacy master branch in git flow
1 parent aab6d6a commit 51e6770

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/com/cloudogu/ces/cesbuildlib/Makefile.groovy

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class Makefile {
2929
}
3030

3131
/**
32-
* Retrieves the value of the BASE_VERSION Variable defined in the Makefile.
32+
* Creates the develop branch for Git Flow based on the base version.
3333
*/
34-
String getDevelopBranchName() {
34+
String getGitFlowDevelopBranch() {
3535
def develop = "develop"
3636
def baseVersion = getBaseVersion()
3737
if (baseVersion != null && baseVersion != "") {
@@ -41,14 +41,14 @@ class Makefile {
4141
}
4242

4343
/**
44-
* Retrieves the value of the BASE_VERSION Variable defined in the Makefile.
44+
* Creates the main branch for Git Flow based on the base version.
4545
*/
46-
String getMainBranchName() {
47-
def main = "main"
46+
String getGitFlowMainBranch(defaultBranch="main") {
4847
def baseVersion = getBaseVersion()
4948
if (baseVersion != null && baseVersion != "") {
50-
return baseVersion + "/" + main
49+
// The master branch is legacy so we don't create one here, even if it was passed as parameter.
50+
return baseVersion + "/main"
5151
}
52-
return main
52+
return defaultBranch
5353
}
5454
}

0 commit comments

Comments
 (0)