Fix recompile script (#3926)

This commit is contained in:
alschmiedt
2020-05-29 11:17:16 -07:00
committed by GitHub
parent 1052f7548b
commit afba82222e
3 changed files with 13 additions and 12 deletions

View File

@@ -29,7 +29,8 @@ module.exports = {
gitSyncDevelop: gitTasks.syncDevelop, gitSyncDevelop: gitTasks.syncDevelop,
gitSyncMaster: gitTasks.syncMaster, gitSyncMaster: gitTasks.syncMaster,
gitCreateRC: gitTasks.createRC, gitCreateRC: gitTasks.createRC,
gitRecompile: gitTasks.recompile, gitPreCompile: gitTasks.preCompile,
gitPostCompile: gitTasks.postCompile,
gitUpdateGithubPages: gitTasks.updateGithubPages, gitUpdateGithubPages: gitTasks.updateGithubPages,
typings: gulp.series(typings.typings, typings.msgTypings), typings: gulp.series(typings.typings, typings.msgTypings),
package: packageTasks.package, package: packageTasks.package,

View File

@@ -31,7 +31,7 @@
"lint": "eslint .", "lint": "eslint .",
"package": "gulp package", "package": "gulp package",
"prepare": "npm run package", "prepare": "npm run package",
"recompile": "gulp gitRecompile", "recompile": "gulp gitPreCompile && npm run bump && gulp gitPostCompile",
"release": "gulp gitCreateRC", "release": "gulp gitCreateRC",
"test": "concurrently 'npm run test:prepare' 'sleep 5 && npm run test:run'", "test": "concurrently 'npm run test:prepare' 'sleep 5 && npm run test:run'",
"test:prepare": "npm run test:setupselenium && npm run test:startselenium", "test:prepare": "npm run test:setupselenium && npm run test:startselenium",

View File

@@ -10,7 +10,6 @@
var gulp = require('gulp'); var gulp = require('gulp');
var execSync = require('child_process').execSync; var execSync = require('child_process').execSync;
var exec = require('child_process').exec;
var typings = require('./typings'); var typings = require('./typings');
var buildTasks = require('./build_tasks'); var buildTasks = require('./build_tasks');
@@ -64,19 +63,19 @@ function checkoutBranch(branchName) {
{ stdio: 'inherit' }); { stdio: 'inherit' });
} }
// Recompile and push to origin. // Switch to a new rebuild branch.
const recompile = gulp.series( const preCompile = gulp.series(
syncDevelop(), syncDevelop(),
function(done) { function(done) {
var branchName = getRebuildBranchName(); var branchName = getRebuildBranchName();
console.log('make-rebuild-branch: creating branch ' + branchName); console.log('make-rebuild-branch: creating branch ' + branchName);
execSync('git checkout -b ' + branchName, { stdio: 'inherit' }); execSync('git checkout -b ' + branchName, { stdio: 'inherit' });
done(); done();
}, }
function(done) { );
exec('npm run bump');
done(); // Build all files, types, and push to rebuild branch.
}, const postCompile = gulp.series(
buildTasks.build, buildTasks.build,
typings.typings, typings.typings,
function(done) { function(done) {
@@ -87,7 +86,7 @@ const recompile = gulp.series(
console.log('Branch ' + branchName + ' pushed to GitHub.'); console.log('Branch ' + branchName + ' pushed to GitHub.');
console.log('Next step: create a pull request against develop.'); console.log('Next step: create a pull request against develop.');
done(); done();
} }
); );
// Create and push an RC branch. // Create and push an RC branch.
@@ -119,6 +118,7 @@ module.exports = {
syncDevelop: syncDevelop, syncDevelop: syncDevelop,
syncMaster: syncMaster, syncMaster: syncMaster,
createRC: createRC, createRC: createRC,
recompile: recompile, preCompile: preCompile,
postCompile: postCompile,
updateGithubPages: updateGithubPages updateGithubPages: updateGithubPages
} }