Update release scripts (#4558)

This commit is contained in:
alschmiedt
2021-01-08 11:52:02 -08:00
committed by GitHub
parent ff4744e9c0
commit 1208987dbb
8 changed files with 238 additions and 37 deletions

View File

@@ -11,7 +11,6 @@
var gulp = require('gulp');
var execSync = require('child_process').execSync;
var typings = require('./typings');
var buildTasks = require('./build_tasks');
const upstream_url = "https://github.com/google/blockly.git";
@@ -63,32 +62,6 @@ function checkoutBranch(branchName) {
{ stdio: 'inherit' });
}
// Switch to a new rebuild branch.
const preCompile = gulp.series(
syncDevelop(),
function(done) {
var branchName = getRebuildBranchName();
console.log('make-rebuild-branch: creating branch ' + branchName);
execSync('git checkout -b ' + branchName, { stdio: 'inherit' });
done();
}
);
// Build all files, types, and push to rebuild branch.
const postCompile = gulp.series(
buildTasks.build,
typings.typings,
function(done) {
console.log('push-rebuild-branch: committing rebuild');
execSync('git commit -am "Rebuild"', { stdio: 'inherit' });
var branchName = getRebuildBranchName();
execSync('git push origin ' + branchName, { stdio: 'inherit' });
console.log('Branch ' + branchName + ' pushed to GitHub.');
console.log('Next step: create a pull request against develop.');
done();
}
);
// Create and push an RC branch.
// Note that this pushes to google/blockly.
const createRC = gulp.series(
@@ -102,6 +75,25 @@ const createRC = gulp.series(
}
);
// Create the rebuild branch.
function createRebuildBranch(done) {
var branchName = getRebuildBranchName();
console.log('make-rebuild-branch: creating branch ' + branchName);
execSync('git checkout -b ' + branchName, { stdio: 'inherit' });
done();
}
// Push the rebuild branch to origin.
function pushRebuildBranch(done) {
console.log('push-rebuild-branch: committing rebuild');
execSync('git commit -am "Rebuild"', { stdio: 'inherit' });
var branchName = getRebuildBranchName();
execSync('git push origin ' + branchName, { stdio: 'inherit' });
console.log('Branch ' + branchName + ' pushed to GitHub.');
console.log('Next step: create a pull request against develop.');
done();
}
// Update github pages with what is currently in develop.
const updateGithubPages = gulp.series(
function(done) {
@@ -123,7 +115,7 @@ module.exports = {
syncDevelop: syncDevelop,
syncMaster: syncMaster,
createRC: createRC,
preCompile: preCompile,
postCompile: postCompile,
updateGithubPages: updateGithubPages
updateGithubPages: updateGithubPages,
createRebuildBranch: createRebuildBranch,
pushRebuildBranch: pushRebuildBranch
}