add release test script for faster release testing. copy extra files
This commit is contained in:
parent
c4670946e6
commit
83fbab63c0
|
@ -15,7 +15,7 @@ import editorpkg from './editor/package';
|
||||||
|
|
||||||
// core-release >
|
// core-release >
|
||||||
|
|
||||||
gulp.task('core-main', function () {
|
gulp.task('core-main', function() {
|
||||||
return pump([
|
return pump([
|
||||||
gulp.src('core/dist/main.js'),
|
gulp.src('core/dist/main.js'),
|
||||||
replace('/*PRODUCTION*/', 'const PRODUCTION = true;'),
|
replace('/*PRODUCTION*/', 'const PRODUCTION = true;'),
|
||||||
|
@ -37,27 +37,34 @@ gulp.task('core-pkg', function() {
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('core-modules', function () {
|
gulp.task('core-modules', function() {
|
||||||
return pump([
|
return pump([
|
||||||
gulp.src('core/dist/modules/**/*'),
|
gulp.src('core/dist/modules/**/*'),
|
||||||
copy('release/core', { prefix: 2 })
|
copy('release/core', { prefix: 2 })
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('core-sparkplug', function () {
|
gulp.task('core-sparkplug', function() {
|
||||||
return pump([
|
return pump([
|
||||||
gulp.src('core/dist/sparkplug.js'),
|
gulp.src('core/dist/sparkplug.js'),
|
||||||
gulp.dest('release/core')
|
gulp.dest('release/core')
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('core-release', gulp.parallel('core-main', 'core-pkg', 'core-sparkplug', 'core-modules'));
|
gulp.task('core-extras', function() {
|
||||||
|
return pump([
|
||||||
|
gulp.src(['core/src/csp.json']),
|
||||||
|
gulp.dest('release/core')
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task('core-release', gulp.parallel('core-main', 'core-pkg', 'core-sparkplug', 'core-modules', 'core-extras'));
|
||||||
|
|
||||||
// < core-release
|
// < core-release
|
||||||
|
|
||||||
// client
|
// client
|
||||||
|
|
||||||
gulp.task('client-main', function () {
|
gulp.task('client-main', function() {
|
||||||
return pump([
|
return pump([
|
||||||
gulp.src('client/dist/*.client-release.js'),
|
gulp.src('client/dist/*.client-release.js'),
|
||||||
rename(`client.${clientpkg.version}.js`),
|
rename(`client.${clientpkg.version}.js`),
|
||||||
|
@ -77,7 +84,7 @@ gulp.task('client-pkg', function() {
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('client-sparkplug', function () {
|
gulp.task('client-sparkplug', function() {
|
||||||
return pump([
|
return pump([
|
||||||
gulp.src('core/dist/sparkplug.js'),
|
gulp.src('core/dist/sparkplug.js'),
|
||||||
gulp.dest('release/client')
|
gulp.dest('release/client')
|
||||||
|
@ -88,7 +95,7 @@ gulp.task('client-release', gulp.parallel('client-main', 'client-pkg', 'client-s
|
||||||
|
|
||||||
// Editor
|
// Editor
|
||||||
|
|
||||||
gulp.task('editor-main', function () {
|
gulp.task('editor-main', function() {
|
||||||
return pump([
|
return pump([
|
||||||
gulp.src('editor/dist/editor.release.js'),
|
gulp.src('editor/dist/editor.release.js'),
|
||||||
rename(`editor.${editorpkg.version}.js`),
|
rename(`editor.${editorpkg.version}.js`),
|
||||||
|
@ -96,10 +103,10 @@ gulp.task('editor-main', function () {
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('editor-pkg', function () {
|
gulp.task('editor-pkg', function() {
|
||||||
return pump([
|
return pump([
|
||||||
gulp.src('editor/package.json'),
|
gulp.src('editor/package.json'),
|
||||||
editjson(function (pkg) {
|
editjson(function(pkg) {
|
||||||
pkg.main = `editor.${editorpkg.version}.js`;
|
pkg.main = `editor.${editorpkg.version}.js`;
|
||||||
delete pkg.scripts;
|
delete pkg.scripts;
|
||||||
return pkg;
|
return pkg;
|
||||||
|
@ -119,18 +126,18 @@ gulp.task('node-modules', function() {
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('node-sass-bindings', gulp.series(function () {
|
gulp.task('node-sass-bindings', gulp.series(function() {
|
||||||
return del(['release/node_modules/node-sass/vendor']);
|
return del(['release/node_modules/node-sass/vendor']);
|
||||||
}, function () {
|
}, function() {
|
||||||
return pump([
|
return pump([
|
||||||
gulp.src('other/node_sass_bindings/**/*'),
|
gulp.src('other/node_sass_bindings/**/*'),
|
||||||
copy('release/core/node_modules/node-sass/vendor', { prefix: 2 })
|
copy('release/core/node_modules/node-sass/vendor', { prefix: 2 })
|
||||||
]);
|
]);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
gulp.task('keytar-bindings', gulp.series(function () {
|
gulp.task('keytar-bindings', gulp.series(function() {
|
||||||
return del(['release/node_modules/keytar/build']);
|
return del(['release/node_modules/keytar/build']);
|
||||||
}, function () {
|
}, function() {
|
||||||
return pump([
|
return pump([
|
||||||
gulp.src('other/keytar/**/*'),
|
gulp.src('other/keytar/**/*'),
|
||||||
copy('release/core/node_modules/keytar/build/Release', { prefix: 2 })
|
copy('release/core/node_modules/keytar/build/Release', { prefix: 2 })
|
||||||
|
|
|
@ -98,7 +98,8 @@
|
||||||
"package_release": "node scripts/package-release.js",
|
"package_release": "node scripts/package-release.js",
|
||||||
"gulp_release": "gulp release",
|
"gulp_release": "gulp release",
|
||||||
"release": "npm run lint && npm run build_release && gulp release && npm run package_release",
|
"release": "npm run lint && npm run build_release && gulp release && npm run package_release",
|
||||||
"update_release": "npm run build_release && gulp build-release",
|
"release_test": "npm run build_release && gulp release",
|
||||||
|
"update_release": "npm run build_release && gulp release",
|
||||||
"inject": "node scripts/inject.js"
|
"inject": "node scripts/inject.js"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue