mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
Merge pull request #3285 from rachel-fenichel/release_tasks_2
Add task to create a release candidate.
This commit is contained in:
22
gulpfile.js
22
gulpfile.js
@@ -801,6 +801,14 @@ function getRebuildBranchName() {
|
||||
return 'rebuild_' + mm + '_' + dd + '_' + yyyy;
|
||||
};
|
||||
|
||||
// Helper function: get a name for a rebuild branch. Format: rebuild_yyyy_mm.
|
||||
function getRCBranchName() {
|
||||
var date = new Date();
|
||||
var mm = date.getMonth() + 1; // Month, 0-11
|
||||
var yyyy = date.getFullYear();
|
||||
return 'rc_' + yyyy + '_' + mm;
|
||||
};
|
||||
|
||||
// Recompile and push to origin.
|
||||
gulp.task('recompile', gulp.series([
|
||||
'git-sync-develop',
|
||||
@@ -822,3 +830,17 @@ gulp.task('recompile', gulp.series([
|
||||
}
|
||||
])
|
||||
);
|
||||
|
||||
// Create and push an RC branch.
|
||||
// Note that this pushes to google/blockly.
|
||||
gulp.task('git-create-rc', gulp.series([
|
||||
'git-sync-develop',
|
||||
function(done) {
|
||||
var branchName = getRCBranchName();
|
||||
execSync('git checkout -b ' + branchName, { stdio: 'inherit' });
|
||||
execSync('git push https://github.com/google/blockly.git ' + branchName,
|
||||
{ stdio: 'inherit' });
|
||||
done();
|
||||
},
|
||||
])
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user