gulp.task('update:bundle', function() { return gulp.src('') .pipe(run('bundle install')) .pipe(run('bundle update')) .pipe(notify({ message: 'Bundle Update Complete' })) .on('error', gutil.log); });
gulp.task("update:bundle", function () { return gulp.src("") .pipe(run("bundle install")) .pipe(run("bundle update")) .pipe(notify({message: "Bundle Update Complete"})) .on("error", gutil.log); });
gulp.task('update:bower', function() { return gulp.src('') .pipe(run('bower install')) .pipe(run('bower prune')) .pipe(run('bower update')) .pipe(notify({ message: 'Bower Update Complete' })) .on('error', gutil.log); });
sequence('seed', function() { console.log(chalk.cyan.bold('Done.')); process.chdir(cwd+Seed.paths.separator+Seed.name); console.log(chalk.cyan.bold('Copying bowerrc...')); run('cp -a '+ Seed.paths.origin + 'seed'+Seed.paths.separator + '.bowerrc '+ cwd+Seed.paths.separator+Seed.name+Seed.paths.separator+'.bowerrc').exec(); console.log(chalk.cyan.bold('Copying Seed assets...')); console.log(chalk.cyan.bold('Running NPM and Bower install...')); run('npm install && bower install').exec(); console.log(chalk.cyan.bold('Done! run gulp serve from your new application!')); });
gulp.task("cordova-prepare", ['copiar-release-android'], function() { run('cordova prepare ios').exec() .pipe(gulp.dest('output')) run('cordova prepare android').exec() .pipe(gulp.dest('output')) });
gulp.task("tests", function () { gulp.src("./tests/PHPushbulletTest.php") .pipe( run("clear") ) .pipe( phpunit("phpunit"), { debug: true, notify: true }) .on("error", function() { run("notify-send 'Tests Failed' 'Got some problems dude.'").exec(); }) .pipe( run("notify-send 'Tests Passed' 'Nailed it.'")); });
gulp.task("tests", function () { gulp.src("./tests/TestBase.php") .pipe( run("clear") ) .pipe( phpunit("phpunit", { debug: false, notify: true })) .on("error", function() { run("notify-send 'Tests Failed' 'Got some problems buddy.'").exec(); }) .pipe( run("notify-send 'Tests Passed' 'Nailed it.'")); });
gulp.task("test-skip", ["clean-output"], function() { return gRun("polymer test --skip-selenium-install", { verbosity: 2 }) .exec() .pipe(gulp.dest("output/test")); });
run('tsd reinstall').exec(function() { run('tsd rebundle').exec(function() { run('git checkout typings/custom.d.ts').exec(done); }); });
gulp.task('install-ace', ['install-bower'], function () { run('npm install', {cwd: process.cwd() + '/bower_components/ace'}).exec(function() { del(['bower_components/ace/build'], {force: true}, function() { run('node Makefile.dryice.js --s --target ./build minimal', {cwd: process.cwd() + '/bower_components/ace'}).exec(); }); }); });
gulp.task('build:jekyll', function() { var shellCommand = 'bundle exec jekyll build --incremental --config _config.yml'; return gulp.src('') .pipe(run(shellCommand)) .on('error', gutil.log); });
gulp.task('install', function(cb) { run('npm install').exec("", function(){ run('tsd reinstall -so').exec("", function(){ run('bower install').exec("", cb); }); }); });
gulp.task('setup', function (done) { run('npm install').exec(function () { run('typings install').exec(function () { done(); }); }); });
gulp.task("lint", ["clean-output"], function() { return gRun("polymer lint", { verbosity: 0 }) .exec() .pipe(gulp.dest("output/lint")); });
gulp.task("serve", ["clean-output"], function() { return gRun("polymer serve -o -p 8088", { verbosity: 0 }) .exec() .pipe(gulp.dest("output/serve")); });
gulp.task('test', function(){ run('clear', {'usePowerShell': true}).exec('Vinyl', function(){ //gulp.src('phpunit.xml').pipe(phpunit('./vendor/bin/phpunit')) //gulp.src('phpunit.xml').pipe(phpunit('.\\vendor\\phpunit\\phpunit\\phpunit')) //gulp.src('phpunit.xml').pipe(phpunit('php vendor/phpunit/phpunit/phpunit')) //gulp.src('phpunit.xml').pipe(phpunit('.\\bin\\phpunit')) gulp.src('phpunit.xml').pipe(phpunit('.\\bin\\phpunit', {silent: true})) //gulp.src('spec/**/*.php') // .pipe(phpspec('', { notify: true})) .on('error', notify.onError({ title: 'WTF???', message: 'The tests failed', icon: __dirname + '/node_modules/gulp-phpspec/assets/test-fail.png' //sound: true, //time: 2000 })) .pipe(notify({ title: 'All done!', message: 'The tests passed', icon: __dirname + '/node_modules/gulp-phpspec/assets/test-pass.png' //sound: true, //time: 2000 })); }); });
gulp.task('systemTests', function () { "use strict"; run('./node_modules/casperjs/bin/casperjs test ./test/systemTests.js').exec() .pipe(gulp.dest('output')) .on('error', handleError); });
gulp.task("serve-bundled", ["clean-output"], function() { return gRun("cd build/bundled/ && polymer serve -o -p 8089", { verbosity: 0 }) .exec() .pipe(gulp.dest("output/serve")); });
run('npm test').exec(function(err){ if (!err) { run('gulp dist').exec(function(err){ console.log('done!'); }); } });
gulp.task('index-fs', /*['build-fs'],*/ function() { return run('./xhrfs-index fs').exec() .pipe(rename(function(path) { path.basename = 'index'; path.extname = '.json'; })) .pipe(gulp.dest('./fs')); });
gulp.task('build:jekyll', function() { var shellCommand = 'bundle exec jekyll build --config _config.yml'; if (config.drafts) { shellCommand += ' --drafts'; }; return gulp.src(paths.jekyllDir) .pipe(run(shellCommand)) .on('error', gutil.log); });
fs.readFile(versionFilePath, 'utf8', function(err, version) { var versionNumber = version.match(/[\d.]+/); if(['all', 'github'].indexOf(target) > -1){ console.log('Generating git tag and push everything.'); gulp.src('./') .pipe(run('git tag -a ' + version + ' -m \'' + version + '\'')) .pipe(wait(5000)) .pipe(run('git push --all origin')) .pipe(run('git push --tags origin')); } if(['all', 'gem'].indexOf(target) > -1){ console.log('Building and pushing Sideshow gem'); gulp.src('./') .pipe(run('gem build sideshow.gemspec')) .pipe(wait(5000)) .pipe(run('gem push sideshow-' + versionNumber + '.gem')); } if(isWin && ['all', 'nuget'].indexOf(target) > -1){ console.log('Packing and pushing Sideshow nuget package'); gulp.src('./') .pipe(run('nuget pack sideshow.nuspec')) .pipe(wait(5000)) .pipe(run('nuget push sideshow.' + versionNumber + '.nupkg')); } });
gulp.task('sami-docs', function () { var binPath = '.\\vendor\\bin\\sami.php.bat'; if (process.platform == 'linux') { binPath = './vendor/bin/sami.php'; } return run(binPath + ' update config/sami.php').exec(); });
run("git commit -m NewBuild").exec(function() { run('git push').exec(done); gulp.src('./package.json').pipe(gitTagV()).on('end', function() { run('git push --tags').exec(done); }); });
gulp.task('run_container', [], function () { //run('sh.exe --login -i /c/tmp/test2.sh', { usePowerShell: true, cwd: 'c:\\tmp' }).exec(); //run('c:/tmp/test2.ps1', { usePowerShell: true }).exec(); //run('START /WAIT powershell "C:\\tmp\\test2.ps1"', { usePowerShell: false }).exec(); //return run('c:/tmp/test2.bat', { usePowerShell: false }).exec(); //return run('START powershell "C:\\Program Files\\Boot2Docker for Windows\\start.sh"').exec(); //return run('sh.exe --login -i .\\start.sh', { usePowerShell: true, cwd: 'C:\\Program Files\\Boot2Docker for Windows' }).exec(); //return run('start.sh', { usePowerShell: true, cwd:'C:\\Program Files\\Boot2Docker for Windows' }).exec(); return run('.\\test2.sh', { usePowerShell: true, cwd: 'C:\\tmp' }).exec(); });
gulp.task('test', function() { gulp.src('Tests/**/*.php') .pipe(run('clear')) .pipe(phpunit('', { notify: true})) .on('error', notify.onError({ title: 'Failed tests', message: 'Tests failed', icon: __dirname + "/fail_icon.png" })) });
run('npm install transparency@^0.10.0 --ignore-scripts').exec(function() { run('tsd reinstall').exec(function() { run('tsd rebundle').exec(function() { run('git checkout typings/custom.d.ts').exec(done); }); }); });
gulp.task('aggregateStats', function() { //exec('echo hello', function(err, stdout, stderr) { // console.log(stdout); // console.log(stderr); //}); //exec('./prepareData.sh', function(err, stdout, stderr) { // console.log(stdout); // console.log(stderr); //}); //exec('cd ..', function(err, stdout, stderr) { // console.log(stdout); // console.log(stderr); ////}); //shell.task([ // 'touch thisisatest.txt' //]); run('cd lib').exec() // prints "Hello World\n". .pipe(run('cat prepareData.sh').exec()) // prints "Hello World\n". .pipe(run('cd ..').exec()); // prints "Hello World\n". });
gulp.task("update-bower", function(done) { var bowerjson = require("./bower.json"); var deps = []; var i, cmd; for (i in bowerjson.dependencies) { deps.push(i); } cmd = "bower install --save --force-latest " + deps.join(" "); run(cmd).exec().on("end", done); });
gulp.task('build', function () { switch (process.env.GALAXY_ENV) { case 'prod': default: console.log('Built prod environment'); run('npm run-script build_directory').exec(); break; } });