File tree Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,8 @@ var_13: &attach_release_output
83
83
var_14 : &publish_branches_filter
84
84
branches :
85
85
only :
86
+ - main
87
+ # TODO(BRANCH_RENAME_CLEANUP): remove
86
88
- master
87
89
# 6.0.x, 7.1.x, etc.
88
90
- /\d+\.\d+\.x/
@@ -134,6 +136,8 @@ var_20: &slack_notify_on_failure
134
136
var_21 : &only_main_branch_filter
135
137
branches :
136
138
only :
139
+ - main
140
+ # TODO(BRANCH_RENAME_CLEANUP): remove
137
141
- master
138
142
139
143
# -----------------------------
@@ -668,7 +672,9 @@ workflows:
668
672
filters :
669
673
branches :
670
674
only :
671
- # We only want to run the "master" branch against the snapshot builds because
675
+ # We only want to run the main branch against the snapshot builds because
672
676
# it's not guaranteed that older versions of Angular Material always work
673
677
# with the latest Angular version.
678
+ - main
679
+ # TODO(BRANCH_RENAME_CLEANUP): remove
674
680
- master
Original file line number Diff line number Diff line change @@ -97,22 +97,31 @@ async function _main() {
97
97
/**
98
98
* Sort a list of fullpath refs into a list and then provide the first entry.
99
99
*
100
- * The sort order will first find master ref , and then any semver ref, followed
100
+ * The sort order will first find main branch , and then any semver ref, followed
101
101
* by the rest of the refs in the order provided.
102
102
*
103
- * Branches are sorted in this order as work is primarily done on master, and
104
- * otherwise on a semver branch. If neither of those were to match, the most
103
+ * Branches are sorted in this order as work is primarily done on main branches,
104
+ * and otherwise on a semver branch. If neither of those were to match, the most
105
105
* likely correct branch will be the first one encountered in the list.
106
106
*/
107
107
function getRefFromBranchList ( gitOutput ) {
108
108
const branches = gitOutput . split ( '\n' ) . map ( b => b . split ( '/' ) . slice ( 1 ) . join ( '' ) . trim ( ) ) ;
109
109
return branches . sort ( ( a , b ) => {
110
+ if ( a === 'main' ) {
111
+ return - 1 ;
112
+ }
113
+ if ( b === 'main' ) {
114
+ return 1 ;
115
+ }
116
+
117
+ // TODO(BRANCH_RENAME_CLEANUP): remove
110
118
if ( a === 'master' ) {
111
119
return - 1 ;
112
120
}
113
121
if ( b === 'master' ) {
114
122
return 1 ;
115
123
}
124
+
116
125
const aIsSemver = semverRegex . test ( a ) ;
117
126
const bIsSemver = semverRegex . test ( b ) ;
118
127
if ( aIsSemver && bIsSemver ) {
Original file line number Diff line number Diff line change 4
4
schedule :
5
5
- cron : ' 0 3 * * 0'
6
6
push :
7
- branches : [master]
7
+ branches : [
8
+ main,
9
+ # TODO(BRANCH_RENAME_CLEANUP): remove
10
+ master,
11
+ ]
8
12
workflow_dispatch :
9
13
10
14
# Declare default permissions as read only.
You can’t perform that action at this time.
0 commit comments