check-deploy task now can actually deploy
This commit is contained in:
parent
d0bfed6c98
commit
4f77b10a3c
26
gulpfile.js
26
gulpfile.js
|
@ -18,6 +18,10 @@ var exec = require('child_process').exec;
|
||||||
var execPromise = Q.denodeify(exec);
|
var execPromise = Q.denodeify(exec);
|
||||||
var prompt = require('prompt');
|
var prompt = require('prompt');
|
||||||
|
|
||||||
|
// TODO:
|
||||||
|
// 1. Think about using runSequence
|
||||||
|
// 2. Think about using spawn instead of exec in case of long error messages.
|
||||||
|
|
||||||
|
|
||||||
var docShredder = require('./public/doc-shredder/doc-shredder');
|
var docShredder = require('./public/doc-shredder/doc-shredder');
|
||||||
|
|
||||||
|
@ -38,13 +42,6 @@ var _excludeMatchers = _excludePatterns.map(function(excludePattern){
|
||||||
return new Minimatch(excludePattern)
|
return new Minimatch(excludePattern)
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
Within this repo generated files are checked in so that we can avoid running the
|
|
||||||
shredder over the entire _examples dir each time someone refreshes the repo
|
|
||||||
( the ‘shred-devguide-examples’ gulp task). The gulp ‘serve-and-watch’ shredder is only
|
|
||||||
a ‘partial’ shredder. It only shred’s files in directories changed during
|
|
||||||
the current session.
|
|
||||||
*/
|
|
||||||
|
|
||||||
gulp.task('help', taskListing.withFilters(function(taskName) {
|
gulp.task('help', taskListing.withFilters(function(taskName) {
|
||||||
var isSubTask = taskName.substr(0,1) == "_";
|
var isSubTask = taskName.substr(0,1) == "_";
|
||||||
|
@ -97,7 +94,6 @@ gulp.task('build-api-docs', ['_shred-api-examples'], function() {
|
||||||
return buildApiDocs();
|
return buildApiDocs();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
gulp.task('_shred-devguide-examples', ['_shred-clean-devguide'], function() {
|
gulp.task('_shred-devguide-examples', ['_shred-clean-devguide'], function() {
|
||||||
return docShredder.shred( _devguideShredOptions);
|
return docShredder.shred( _devguideShredOptions);
|
||||||
});
|
});
|
||||||
|
@ -120,7 +116,6 @@ gulp.task('_build-shred-maps', function() {
|
||||||
return build-shred-maps(true);
|
return build-shred-maps(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
gulp.task('git-changed-examples', ['_shred-devguide-examples'], function(){
|
gulp.task('git-changed-examples', ['_shred-devguide-examples'], function(){
|
||||||
var after, sha, messageSuffix;
|
var after, sha, messageSuffix;
|
||||||
if (argv.after) {
|
if (argv.after) {
|
||||||
|
@ -168,14 +163,19 @@ gulp.task('git-changed-examples', ['_shred-devguide-examples'], function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('check-deploy', function() {
|
gulp.task('check-deploy', function() {
|
||||||
return execPromise(['npm run harp -- compile . ./deploy'], {}).then(function() {
|
console.log('running harp compile...');
|
||||||
execPromise('npm run live-server ./deploy');
|
return execPromise('npm run harp -- compile . ./www', {}).then(function() {
|
||||||
|
execPromise('npm run live-server ./www');
|
||||||
return askDeploy();
|
return askDeploy();
|
||||||
}).then(function(shouldDeploy) {
|
}).then(function(shouldDeploy) {
|
||||||
if (shouldDeploy) {
|
if (shouldDeploy) {
|
||||||
console.log("Sorry! Deploy to Firebase has not yet been implemented.")
|
console.log('deploying...');
|
||||||
|
return execPromise('firebase deploy');
|
||||||
|
} else {
|
||||||
|
return ['Not deploying'];
|
||||||
}
|
}
|
||||||
return;
|
}).then(function(s) {
|
||||||
|
console.log(s.join(''));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue