File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,8 @@ var_13: &attach_release_output
82
82
var_14 : &publish_branches_filter
83
83
branches :
84
84
only :
85
+ - main
86
+ # TODO(BRANCH_RENAME_CLEANUP): remove
85
87
- master
86
88
# 6.0.x, 7.1.x, etc.
87
89
- /\d+\.\d+\.x/
@@ -134,8 +136,10 @@ var_20: &slack_notify_on_failure
134
136
# Branch filter that only matches the main branch.
135
137
var_21 : &only_main_branch_filter
136
138
branches :
137
- only :
138
- - master
139
+ only :
140
+ - main
141
+ # TODO(BRANCH_RENAME_CLEANUP): remove
142
+ - master
139
143
140
144
# -----------------------------
141
145
# Container version of CircleCI
@@ -715,7 +719,9 @@ workflows:
715
719
filters :
716
720
branches :
717
721
only :
718
- # We only want to run the "master" branch against the snapshot builds because
722
+ # We only want to run the main branch against the snapshot builds because
719
723
# it's not guaranteed that older versions of Angular Material always work
720
724
# with the latest Angular version.
725
+ - main
726
+ # TODO(BRANCH_RENAME_CLEANUP): remove
721
727
- master
Original file line number Diff line number Diff line change @@ -95,22 +95,31 @@ async function _main() {
95
95
/**
96
96
* Sort a list of fullpath refs into a list and then provide the first entry.
97
97
*
98
- * The sort order will first find master ref , and then any semver ref, followed
98
+ * The sort order will first find main branch , and then any semver ref, followed
99
99
* by the rest of the refs in the order provided.
100
100
*
101
- * Branches are sorted in this order as work is primarily done on master, and
102
- * otherwise on a semver branch. If neither of those were to match, the most
101
+ * Branches are sorted in this order as work is primarily done on main branches,
102
+ * and otherwise on a semver branch. If neither of those were to match, the most
103
103
* likely correct branch will be the first one encountered in the list.
104
104
*/
105
105
function getRefFromBranchList ( gitOutput ) {
106
106
const branches = gitOutput . split ( '\n' ) . map ( b => b . split ( '/' ) . slice ( 1 ) . join ( '' ) . trim ( ) ) ;
107
107
return branches . sort ( ( a , b ) => {
108
+ if ( a === 'main' ) {
109
+ return - 1 ;
110
+ }
111
+ if ( b === 'main' ) {
112
+ return 1 ;
113
+ }
114
+
115
+ // TODO(BRANCH_RENAME_CLEANUP): remove
108
116
if ( a === 'master' ) {
109
117
return - 1 ;
110
118
}
111
119
if ( b === 'master' ) {
112
120
return 1 ;
113
121
}
122
+
114
123
const aIsSemver = semverRegex . test ( a ) ;
115
124
const bIsSemver = semverRegex . test ( b ) ;
116
125
if ( aIsSemver && bIsSemver ) {
You can’t perform that action at this time.
0 commit comments