Port the mozcentralbaseline target to Gulp
				
					
				
			The baseline fix is dead code since three years, so we can safely remove it.
This commit is contained in:
		
							parent
							
								
									165294a05f
								
							
						
					
					
						commit
						74854fb4cc
					
				
							
								
								
									
										25
									
								
								gulpfile.js
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								gulpfile.js
									
									
									
									
									
								
							@ -43,6 +43,7 @@ var TEST_DIR = 'test/';
 | 
				
			|||||||
var EXTENSION_SRC_DIR = 'extensions/';
 | 
					var EXTENSION_SRC_DIR = 'extensions/';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var BASELINE_DIR = BUILD_DIR + 'baseline/';
 | 
					var BASELINE_DIR = BUILD_DIR + 'baseline/';
 | 
				
			||||||
 | 
					var MOZCENTRAL_BASELINE_DIR = BUILD_DIR + 'mozcentral.baseline/';
 | 
				
			||||||
var GENERIC_DIR = BUILD_DIR + 'generic/';
 | 
					var GENERIC_DIR = BUILD_DIR + 'generic/';
 | 
				
			||||||
var COMPONENTS_DIR = BUILD_DIR + 'components/';
 | 
					var COMPONENTS_DIR = BUILD_DIR + 'components/';
 | 
				
			||||||
var SINGLE_FILE_DIR = BUILD_DIR + 'singlefile/';
 | 
					var SINGLE_FILE_DIR = BUILD_DIR + 'singlefile/';
 | 
				
			||||||
@ -1347,6 +1348,30 @@ gulp.task('dist-repo-git', ['dist-repo-prepare'], function () {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
gulp.task('dist', ['dist-repo-git']);
 | 
					gulp.task('dist', ['dist-repo-git']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					gulp.task('mozcentralbaseline', ['baseline'], function (done) {
 | 
				
			||||||
 | 
					  console.log();
 | 
				
			||||||
 | 
					  console.log('### Creating mozcentral baseline environment');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Create a mozcentral build.
 | 
				
			||||||
 | 
					  rimraf.sync(BASELINE_DIR + BUILD_DIR);
 | 
				
			||||||
 | 
					  spawnSync('gulp', ['mozcentral', '--cwd', BASELINE_DIR], {env: process.env});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Copy the mozcentral build to the mozcentral baseline directory.
 | 
				
			||||||
 | 
					  rimraf.sync(MOZCENTRAL_BASELINE_DIR);
 | 
				
			||||||
 | 
					  mkdirp.sync(MOZCENTRAL_BASELINE_DIR);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  gulp.src([BASELINE_DIR + BUILD_DIR + 'mozcentral/**/*'])
 | 
				
			||||||
 | 
					      .pipe(gulp.dest(MOZCENTRAL_BASELINE_DIR))
 | 
				
			||||||
 | 
					      .on('end', function () {
 | 
				
			||||||
 | 
					        // Commit the mozcentral baseline.
 | 
				
			||||||
 | 
					        spawnSync('git', ['init'], {cwd: MOZCENTRAL_BASELINE_DIR});
 | 
				
			||||||
 | 
					        spawnSync('git', ['add', '.'], {cwd: MOZCENTRAL_BASELINE_DIR});
 | 
				
			||||||
 | 
					        spawnSync('git', ['commit', '-m', 'mozcentral baseline'],
 | 
				
			||||||
 | 
					                  {cwd: MOZCENTRAL_BASELINE_DIR});
 | 
				
			||||||
 | 
					        done();
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Getting all shelljs registered tasks and register them with gulp
 | 
					// Getting all shelljs registered tasks and register them with gulp
 | 
				
			||||||
require('./make.js');
 | 
					require('./make.js');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										34
									
								
								make.js
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								make.js
									
									
									
									
									
								
							@ -223,39 +223,7 @@ target.baseline = function() {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
target.mozcentralbaseline = function() {
 | 
					target.mozcentralbaseline = function() {
 | 
				
			||||||
  target.baseline();
 | 
					  execGulp('mozcentralbaseline');
 | 
				
			||||||
 | 
					 | 
				
			||||||
  cd(ROOT_DIR);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  echo();
 | 
					 | 
				
			||||||
  echo('### Creating mozcentral baseline environment');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  var BASELINE_DIR = BUILD_DIR + 'baseline';
 | 
					 | 
				
			||||||
  var MOZCENTRAL_BASELINE_DIR = BUILD_DIR + 'mozcentral.baseline';
 | 
					 | 
				
			||||||
  if (test('-d', MOZCENTRAL_BASELINE_DIR)) {
 | 
					 | 
				
			||||||
    rm('-rf', MOZCENTRAL_BASELINE_DIR);
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  cd(BASELINE_DIR);
 | 
					 | 
				
			||||||
  if (test('-d', 'build')) {
 | 
					 | 
				
			||||||
    rm('-rf', 'build');
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  exec('node make mozcentral');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  cd(ROOT_DIR);
 | 
					 | 
				
			||||||
  mkdir(MOZCENTRAL_BASELINE_DIR);
 | 
					 | 
				
			||||||
  cp('-Rf', BASELINE_DIR + '/build/mozcentral/*', MOZCENTRAL_BASELINE_DIR);
 | 
					 | 
				
			||||||
  // fixing baseline
 | 
					 | 
				
			||||||
  if (test('-f', MOZCENTRAL_BASELINE_DIR +
 | 
					 | 
				
			||||||
                 '/browser/extensions/pdfjs/PdfStreamConverter.js')) {
 | 
					 | 
				
			||||||
    rm(MOZCENTRAL_BASELINE_DIR +
 | 
					 | 
				
			||||||
       '/browser/extensions/pdfjs/PdfStreamConverter.js');
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  cd(MOZCENTRAL_BASELINE_DIR);
 | 
					 | 
				
			||||||
  exec('git init');
 | 
					 | 
				
			||||||
  exec('git add .');
 | 
					 | 
				
			||||||
  exec('git commit -m "mozcentral baseline"');
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
target.mozcentraldiff = function() {
 | 
					target.mozcentraldiff = function() {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user