Issue #1 closed. Fixed suhosin error

This commit is contained in:
Derek McDaniel 2017-02-02 22:33:01 -05:00
parent 882c35b0ee
commit 055543a43a

View File

@ -9,24 +9,52 @@ var fs = require('fs'),
gzip = require('gulp-gzip'), gzip = require('gulp-gzip'),
rename = require('gulp-rename'); rename = require('gulp-rename');
var composer = require("gulp-composer"), var config = {
gutils = require("gulp-util"); getComposerUrl: 'https://getcomposer.org/installer',
phpBin: 'php -d "suhosin.executor.include.whitelist = phar"',
package: require('./composer.json')
}
// ... // Cleans all built files
gulp.task('clean', function(callback) {
del([
'release',
], callback);
});
composer("init", { "no-interaction": true }); // Get and install PHP Composer
composer('require maknz/slack', {}); gulp.task('get-composer', function(callback) {
// Check if Composer already in place
if (fs.existsSync('./composer.phar')) {
callback(null);
if (gutils.env.production) { return;
composer({ }
"bin": "/build/share/composer.phar",
"no-ansi": true, // Get installer from the internet
"self-install": false, https.get(config.getComposerUrl, function(response) {
// Run PHP to install Composer
var php = exec(config.phpBin, function(error, stdout, stderr) {
callback(error ? stderr : null);
});
// Pass installer code to PHP via STDIN
response.pipe(php.stdin);
}); });
} else { });
//default install
composer(); // Install Composer dependencies excluding development ones
} gulp.task('composer-install', ['get-composer'], function(callback) {
exec(config.phpBin + ' composer.phar install --no-dev', function(error, stdout, stderr) {
callback(error ? stderr : null);
});
});
// Install all Composer dependencies
gulp.task('composer-install-dev', ['get-composer'], function(callback) {
exec(config.phpBin + ' composer.phar install', function(error, stdout, stderr) {
callback(error ? stderr : null);
});
});
gulp.task('prepare-release', function() { gulp.task('prepare-release', function() {
var version = require('./package.json').version; var version = require('./package.json').version;
@ -43,7 +71,7 @@ gulp.task('prepare-release', function() {
}); });
// Builds and packs plugins sources // Builds and packs plugins sources
gulp.task('default', ['prepare-release'], function() { gulp.task('default', ['composer-install','prepare-release'], function() {
// The "default" task is just an alias for "prepare-release" task. // The "default" task is just an alias for "prepare-release" task.
}); });