mirror of
https://github.com/google/blockly.git
synced 2025-12-16 06:10:12 +01:00
Update demo deploy script and fix gcloudignore file (#4566)
This commit is contained in:
@@ -2,14 +2,12 @@
|
||||
.*
|
||||
*.soy
|
||||
*.komodoproject
|
||||
/deploy
|
||||
deploy
|
||||
/static/appengine/
|
||||
/static/closure/
|
||||
/static/demos/plane/soy/*.jar
|
||||
/static/demos/plane/xlf/
|
||||
/static/externs/
|
||||
/static/msg/json/
|
||||
/static/node_modules/
|
||||
/static/scripts/
|
||||
/static/typings/
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script to deploy on GAE.
|
||||
|
||||
APP=./app.yaml
|
||||
if ! [ -f $APP ] ; then
|
||||
echo $APP not found 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PROJECT=blockly-demo
|
||||
VERSION=37
|
||||
|
||||
echo 'Beginning deployment...'
|
||||
gcloud app deploy --project $PROJECT --version $VERSION --no-promote
|
||||
echo 'Deployment finished.'
|
||||
@@ -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