From a77130a0c2e8320e1aabf2b331eae601e0e66efd Mon Sep 17 00:00:00 2001
From: Jonas Jenwald <jonas.jenwald@gmail.com>
Date: Wed, 19 Apr 2017 12:48:05 +0200
Subject: [PATCH] Remove the `signchromium` target from `make.js`

According to the IRC discussion starting at http://logs.glob.uno/?c=mozilla%23pdfjs&s=18+Apr+2017&e=18+Apr+2017#c59676, and in particular http://logs.glob.uno/?c=mozilla%23pdfjs&s=18+Apr+2017&e=18+Apr+2017#c59682, this build target is unused and can thus be removed.
---
 gulpfile.js  | 10 +------
 make.js      | 73 ----------------------------------------------------
 package.json |  1 -
 3 files changed, 1 insertion(+), 83 deletions(-)

diff --git a/gulpfile.js b/gulpfile.js
index 5d957736a..b350f8828 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -26,7 +26,6 @@ var transform = require('gulp-transform');
 var mkdirp = require('mkdirp');
 var path = require('path');
 var rimraf = require('rimraf');
-var runSequence = require('run-sequence');
 var stream = require('stream');
 var exec = require('child_process').exec;
 var spawn = require('child_process').spawn;
@@ -953,14 +952,7 @@ gulp.task('chromium-pre', ['buildnumber', 'locale'], function () {
   ]);
 });
 
-gulp.task('chromium', ['chromium-pre'], function (done) {
-  // Bundle the files to a Chrome extension file .crx if path to key is set
-  if (!process.env['PDFJS_CHROME_KEY']) {
-    done();
-    return;
-  }
-  runSequence('signchromium', done);
-});
+gulp.task('chromium', ['chromium-pre']);
 
 gulp.task('jsdoc', function (done) {
   console.log();
diff --git a/make.js b/make.js
index 6388454fa..ff0ac8371 100644
--- a/make.js
+++ b/make.js
@@ -162,79 +162,6 @@ target.chromium = function() {
   execGulp('chromium');
 };
 
-target.signchromium = function () {
-  cd(ROOT_DIR);
-
-  var CHROME_BUILD_DIR = BUILD_DIR + '/chromium/';
-
-  // Bundle the files to a Chrome extension file .crx if path to key is set
-  var pem = env['PDFJS_CHROME_KEY'];
-  if (!pem) {
-    echo('The PDFJS_CHROME_KEY must be specified.');
-    exit(1);
-  }
-
-  echo();
-  echo('### Bundling .crx extension into ' + CHROME_BUILD_DIR);
-
-  if (!test('-f', pem)) {
-    echo('Incorrect PDFJS_CHROME_KEY path');
-    exit(1);
-  }
-
-  var browserManifest = env['PDF_BROWSERS'] ||
-      'test/resources/browser_manifests/browser_manifest.json';
-
-  if (!test('-f', browserManifest)) {
-    echo('Browser manifest file ' + browserManifest + ' does not exist.');
-    echo('Copy and adjust the example in test/resources/browser_manifests.');
-    exit(1);
-  }
-
-  var manifest;
-  try {
-    manifest = JSON.parse(cat(browserManifest));
-  } catch (e) {
-    echo('Malformed browser manifest file');
-    echo(e.message);
-    exit(1);
-  }
-
-  var executable;
-  manifest.forEach(function(browser) {
-    if (browser.name === 'chrome') {
-      executable = browser.path;
-    }
-  });
-
-  // If there was no chrome entry in the browser manifest, exit
-  if (!executable) {
-    echo('There was no \'chrome\' entry in the browser manifest');
-    exit(1);
-  }
-
-  // If we're on a Darwin (Mac) OS, then let's check for an .app path
-  if (process.platform === 'darwin' && executable.indexOf('.app') !== -1) {
-    executable = executable + '/Contents/MacOS/Google Chrome';
-  }
-
-  // If the chrome executable doesn't exist
-  if (!test('-f', executable)) {
-    echo('Incorrect executable path to chrome');
-    exit(1);
-  }
-
-  // Let chrome pack the extension for us
-  exec('"' + executable + '"' +
-    ' --no-message-box' +
-    ' "--pack-extension=' + ROOT_DIR + CHROME_BUILD_DIR + '"' +
-    ' "--pack-extension-key=' + pem + '"');
-
-  // Rename to pdf.js.crx
-  mv(BUILD_DIR + 'chrome.crx', CHROME_BUILD_DIR + 'pdf.js.crx');
-};
-
-
 ////////////////////////////////////////////////////////////////////////////////
 //
 // Test stuff
diff --git a/package.json b/package.json
index 1ce96875f..982a7e148 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,6 @@
     "mkdirp": "^0.5.1",
     "node-ensure": "^0.0.0",
     "rimraf": "^2.4.1",
-    "run-sequence": "^1.2.2",
     "shelljs": "~0.4.0",
     "streamqueue": "^1.1.1",
     "systemjs": "^0.20.7",