Switch go Gulp 4 for builds

This commit is contained in:
Fedor A. Fetisov 2021-01-29 22:20:06 +03:00
parent 3b7522be94
commit 7663f63424
2 changed files with 10 additions and 12 deletions

View File

@ -35,13 +35,13 @@ gulp.task('get-composer', function(callback) {
}); });
// Install Composer dependencies // Install Composer dependencies
gulp.task('composer-install', ['get-composer'], function(callback) { gulp.task('composer-install', gulp.series('get-composer', function(callback) {
exec(config.phpBin + ' composer.phar install --no-dev', function(error, stdout, stderr) { exec(config.phpBin + ' composer.phar install --no-dev', function(error, stdout, stderr) {
callback(error ? stderr : null); callback(error ? stderr : null);
}); });
}); }));
gulp.task('prepare-release', ['composer-install'], function() { gulp.task('prepare-release', gulp.series('composer-install', function() {
var version = require('./package.json').version; var version = require('./package.json').version;
return eventStream.merge( return eventStream.merge(
@ -51,14 +51,12 @@ gulp.task('prepare-release', ['composer-install'], function() {
.pipe(tar('geo-ip-plugin-' + version + '.tar')) .pipe(tar('geo-ip-plugin-' + version + '.tar'))
.pipe(gzip()) .pipe(gzip())
) )
.pipe(chmod(644)) .pipe(chmod(0644))
.pipe(gulp.dest('release')); .pipe(gulp.dest('release'));
}); }));
// Builds and packs plugins sources // Builds and packs plugins sources
gulp.task('default', ['prepare-release'], function() { gulp.task('default', gulp.series('prepare-release'));
// The "default" task is just an alias for "prepare-release" task.
});
/** /**
* Returns files stream with the plugin sources. * Returns files stream with the plugin sources.

View File

@ -1,12 +1,12 @@
{ {
"version": "1.0.2", "version": "1.0.2",
"devDependencies": { "devDependencies": {
"gulp": "~3.8.10", "gulp": "^4.0.0",
"event-stream": "~3.1.7", "event-stream": "~3.1.7",
"gulp-zip": "~2.0.2", "gulp-zip": "~2.0.2",
"gulp-tar": "~1.3.1", "gulp-tar": "~3.1.0",
"gulp-gzip": "~0.0.8", "gulp-gzip": "~0.0.8",
"gulp-chmod": "~1.2.0", "gulp-chmod": "~3.0.0",
"gulp-rename": "~1.2.0" "gulp-rename": "~1.2.0"
} }
} }