Merge pull request #3285 from rachel-fenichel/release_tasks_2

Add task to create a release candidate.
This commit is contained in:
Rachel Fenichel
2019-10-18 11:37:37 -06:00
committed by GitHub

View File

@@ -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();
},
])
);