mirror of
https://github.com/google/blockly.git
synced 2026-01-09 18:10:08 +01:00
Update demo deploy script and fix gcloudignore file (#4566)
This commit is contained in:
@@ -12,6 +12,7 @@ var gulp = require('gulp');
|
||||
|
||||
var fs = require('fs');
|
||||
var rimraf = require('rimraf');
|
||||
var path = require('path');
|
||||
var execSync = require('child_process').execSync;
|
||||
|
||||
var packageJson = require('../../package.json');
|
||||
@@ -45,13 +46,16 @@ function copyStaticSrc(done) {
|
||||
* Copies appengine files into deploy directory.
|
||||
*/
|
||||
function copyAppengineSrc() {
|
||||
return gulp.src(['appengine/**/*', 'appengine/.gcloudignore',])
|
||||
.pipe(gulp.dest(demoTmpDir));
|
||||
const appengineSrc = [
|
||||
path.join(demoStaticTmpDir, 'appengine/**/*'),
|
||||
path.join(demoStaticTmpDir, 'appengine/.gcloudignore'),
|
||||
];
|
||||
return gulp.src(appengineSrc).pipe(gulp.dest(demoTmpDir));
|
||||
}
|
||||
|
||||
/**
|
||||
* Deploys files from tmp directory to appengine to the minor version defined in
|
||||
* package.json and then cleans the tmp directory.
|
||||
* Deploys files from tmp directory to appengine to version based on the version
|
||||
* specified in package.json and then cleans the tmp directory.
|
||||
*/
|
||||
function deployAndClean(done) {
|
||||
const minorVersion = packageJson.version.split('.')[1];
|
||||
@@ -76,7 +80,8 @@ function deployAndClean(done) {
|
||||
*/
|
||||
const deployDemos = gulp.series(
|
||||
prepareDeployDir,
|
||||
gulp.parallel(copyStaticSrc, copyAppengineSrc),
|
||||
copyStaticSrc,
|
||||
copyAppengineSrc,
|
||||
deployAndClean
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user