We are working on a product that has a webpage. We build the final web files using gulp. And we adjusted our main development machine and web developer workstation to produce the same results of all our software components, except this one.
This is a part of our gulp file:
var scripts = [
"Vendors/jquery-2.1.1.js",
"Vendors/angular-1.4.3.js",
"Vendors/jquery.mousewheel.js",
"Vendors/angular-animate-1.4.3.js",
"Vendors/angular-cookies-1.4.3.js",
"Vendors/angular-touch-1.4.3.js",
"Vendors/angular-ui-router-0.3.1.js",
"Vendors/underscore-min.js",
"Vendors/screenfull.js",
"Vendors/events.min.js",
"Vendors/mutate.min.js",
"Vendors/xml2json.min.js",
"Vendors/Blob.js",
"Vendors/FileSaver.js",
"GlobalScripts/utils.js",
"Controls/kControlMain.js",
"Controls/*.js", //asterisks line
"Behaviors/*.js", //asterisks line
"Services/httpCommunicationServiceFactory.js",
"../application/app.js",
"Partials/js/*.js", //asterisks line
"Services/*.js", //asterisks line
"Vendors/angular-sortable.js",
"app_common/**/*.js", //asterisks line
"../application/**/*.js", //asterisks line
"!../application/**/*application.min.js"
];
return gulp.src(scripts)
.pipe(concat('app.js'))
.pipe(gulp.dest(<path/to/dest>));
This code runs on both Linux and Windows and we need the result to be identical. We relay on the MD5 hash result to be compared in the future.
Currently, Linux and Windows looks at the asterisks lines in the given paths in scripts variable, and pushes the results in some order, which works differently in the two Operating Systems. That messes up the results in app.js output file.
We tried to sort the results, using gulp-order package, but the order of the files is important because of dependencies issues.
We assume that the differences is due to the fact that Linux is case sensitive and Windows is not.
Aucun commentaire:
Enregistrer un commentaire