mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
Fix(script): schedule presubmit at same time and fix a typo in file name (#13418)
* fix(script): make the presubmit run at same time * fix(script): fix typo in file name
This commit is contained in:
+1
-11
@@ -24,9 +24,6 @@ const presubmitScript = `${process.env.MAT_PRESUBMIT_DIR}/material-presubmit.sh`
|
||||
/** Time to start presubmits. */
|
||||
const startTime = '9:30 pm';
|
||||
|
||||
/** Number of minutes between presubmit runs. */
|
||||
const intervalMinutes = 10;
|
||||
|
||||
/** Instead of querying github for PR numbers, manually provide the PR numbers to be presubmit */
|
||||
const explicitPullRequests = [];
|
||||
|
||||
@@ -41,10 +38,6 @@ const githubSearchOptions = {
|
||||
/** END OF CONFIGURATION. */
|
||||
|
||||
|
||||
|
||||
/** Number of intervals that have scheduled tasks already. */
|
||||
let presubmitCount = 0;
|
||||
|
||||
if (explicitPullRequests.length) {
|
||||
writeScheduleScript(explicitPullRequests.map(n => ({number: n})));
|
||||
} else {
|
||||
@@ -69,10 +62,7 @@ function writeScheduleScript(prs) {
|
||||
`cd ${localRepo} ; ` +
|
||||
`${presubmitScript} ${pr.number} --global 2>&1 > ${logDir}/pr-${pr.number}.txt ` +
|
||||
`)' | ` +
|
||||
`at ${startTime} today + ${intervalMinutes * presubmitCount} min ` +
|
||||
`\n`;
|
||||
|
||||
presubmitCount++;
|
||||
`at ${startTime} today \n`;
|
||||
}
|
||||
|
||||
fs.writeFileSync(path.join(localRepo, 'dist', 'schedule-presubmit.sh'), script, 'utf-8');
|
||||
Reference in New Issue
Block a user