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
8383var_14 : &publish_branches_filter
8484 branches :
8585 only :
86+ - main
87+ # TODO(BRANCH_RENAME_CLEANUP): remove
8688 - master
8789 # 6.0.x, 7.1.x, etc.
8890 - /\d+\.\d+\.x/
@@ -134,6 +136,8 @@ var_20: &slack_notify_on_failure
134136var_21 : &only_main_branch_filter
135137 branches :
136138 only :
139+ - main
140+ # TODO(BRANCH_RENAME_CLEANUP): remove
137141 - master
138142
139143# -----------------------------
@@ -668,7 +672,9 @@ workflows:
668672 filters :
669673 branches :
670674 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
672676 # it's not guaranteed that older versions of Angular Material always work
673677 # with the latest Angular version.
678+ - main
679+ # TODO(BRANCH_RENAME_CLEANUP): remove
674680 - master
Original file line number Diff line number Diff line change @@ -97,22 +97,31 @@ async function _main() {
9797/**
9898 * Sort a list of fullpath refs into a list and then provide the first entry.
9999 *
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
101101 * by the rest of the refs in the order provided.
102102 *
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
105105 * likely correct branch will be the first one encountered in the list.
106106 */
107107function getRefFromBranchList ( gitOutput ) {
108108 const branches = gitOutput . split ( '\n' ) . map ( b => b . split ( '/' ) . slice ( 1 ) . join ( '' ) . trim ( ) ) ;
109109 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
110118 if ( a === 'master' ) {
111119 return - 1 ;
112120 }
113121 if ( b === 'master' ) {
114122 return 1 ;
115123 }
124+
116125 const aIsSemver = semverRegex . test ( a ) ;
117126 const bIsSemver = semverRegex . test ( b ) ;
118127 if ( aIsSemver && bIsSemver ) {
Original file line number Diff line number Diff line change 44 schedule :
55 - cron : ' 0 3 * * 0'
66 push :
7- branches : [master]
7+ branches : [
8+ main,
9+ # TODO(BRANCH_RENAME_CLEANUP): remove
10+ master,
11+ ]
812 workflow_dispatch :
913
1014# Declare default permissions as read only.
You can’t perform that action at this time.
0 commit comments