Skip to content

Commit ff5f1db

Browse files
committed
Fix some problems blocking Tbird extension submission
1 parent 79e02bf commit ff5f1db

File tree

5 files changed

+356
-99
lines changed

5 files changed

+356
-99
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"no-mixed-spaces-and-tabs": "error",
8686
"no-multi-spaces": "error",
8787
"no-multi-str": "error",
88-
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 0 }],
88+
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 0 }],
8989
"no-negated-in-lhs": "error",
9090
"no-new": "error",
9191
"no-new-func": "error",

src/install.rdf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@
77
<em:id>[email protected]</em:id>
88
<em:version>2.13.3</em:version>
99

10+
<!-- Firefox -->
1011
<em:targetApplication>
1112
<Description>
12-
<!-- Firefox -->
1313
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
1414
<em:minVersion>11.0</em:minVersion>
1515
<em:maxVersion>49.*</em:maxVersion>
1616
</Description>
1717
</em:targetApplication>
1818

19-
<!-- Postbox -->
19+
<!-- Thunderbird -->
2020
<em:targetApplication>
2121
<Description>
22-
<em:id>[email protected]</em:id>
23-
<em:minVersion>2.0</em:minVersion>
24-
<em:maxVersion>5.*</em:maxVersion>
22+
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
23+
<em:minVersion>6.0</em:minVersion>
24+
<em:maxVersion>60.*</em:maxVersion>
2525
</Description>
2626
</em:targetApplication>
2727

utils/build.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"use strict";
88

99
var fs = require('fs');
10-
var path = require('path');
1110
var file = require('file');
1211
var archiver = require('archiver');
1312
var MetaScript = require('MetaScript');
@@ -60,16 +59,18 @@ function fnameMatch(fpath, inputArray) {
6059

6160
// Add a file to the Chrome extension zip
6261
function addBuildFile(platformName, zip, fullPath, zipPath) {
62+
var fileContents;
63+
6364
// For the Mozilla extensions in particular, we need to do some preprocessing on JavaScript files
6465
// in order to exclude code specific to other platforms.
6566
if (javascriptFileRegex.test(fullPath)) {
66-
var fileContents = fs.readFileSync(fullPath);
67+
fileContents = fs.readFileSync(fullPath);
6768
fileContents = MetaScript.transform(fileContents, {platform: platformName});
6869
zip.append(fileContents, { name: zipPath });
6970
}
7071
else if (platformName === CHROME_PLATFORM && manifestJsonFileRegex.test(fullPath)) {
7172
// Remove the Firefox-specific stuff from manifest.json when building for Chrome.
72-
var fileContents = fs.readFileSync(fullPath, {encoding: 'utf8'});
73+
fileContents = fs.readFileSync(fullPath, {encoding: 'utf8'});
7374
fileContents = fileContents.replace(/,"applications":[^{]*{[^{]*{[^}]*}[^}]*}/m, '');
7475
zip.append(fileContents, { name: zipPath });
7576
}
@@ -96,8 +97,8 @@ function setUpZips() {
9697
}
9798

9899
var chromeZip = new archiver('zip'); // Chrome will reject the zip if there's no compression
99-
var firefoxZip = new archiver('zip', {store: true});
100-
var thunderbirdZip = new archiver('zip', {store: true});
100+
var firefoxZip = new archiver('zip');
101+
var thunderbirdZip = new archiver('zip'); // addons.thunderbird.net rejects the xpi if there's no compression
101102

102103
chromeZip.on('error', function(err) {
103104
console.log('chromeZip error:', err);
@@ -121,7 +122,7 @@ function setUpZips() {
121122
return {
122123
chrome: chromeZip,
123124
firefox: firefoxZip,
124-
thunderbird: thunderbirdZip,
125+
thunderbird: thunderbirdZip
125126
};
126127
}
127128

0 commit comments

Comments
 (0)