Skip to content

Commit 333062c

Browse files
felixgiraultkumar303
authored andcommitted
fix: Fixed bug where --ignore-files had no effect on web-ext sign (#846)
1 parent 33639da commit 333062c

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

src/cmd/sign.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export type SignParams = {|
2424
verbose?: boolean,
2525
sourceDir: string,
2626
artifactsDir: string,
27+
ignoreFiles?: Array<string>,
2728
apiKey: string,
2829
apiSecret: string,
2930
apiUrlPrefix: string,
@@ -45,8 +46,8 @@ export type SignResult = {|
4546

4647
export default function sign(
4748
{
48-
verbose, sourceDir, artifactsDir, apiKey, apiSecret,
49-
apiUrlPrefix, apiProxy, id, timeout,
49+
verbose, sourceDir, artifactsDir, ignoreFiles = [],
50+
apiKey, apiSecret, apiUrlPrefix, apiProxy, id, timeout,
5051
}: SignParams,
5152
{
5253
build = defaultBuilder, signAddon = defaultAddonSigner,
@@ -66,7 +67,7 @@ export default function sign(
6667
}
6768

6869
const [buildResult, idFromSourceDir] = await Promise.all([
69-
build({sourceDir, artifactsDir: tmpDir.path()},
70+
build({sourceDir, ignoreFiles, artifactsDir: tmpDir.path()},
7071
{manifestData, showReadyMessage: false}),
7172
getIdFromSourceDir(sourceDir),
7273
]);

tests/unit/test-cmd/test.sign.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,18 @@ describe('sign', () => {
303303
}
304304
));
305305

306+
it('passes the ignoreFiles flag to the builder', () => withTempDir(
307+
(tmpDir) => {
308+
const stubs = getStubs();
309+
const ignoreFiles = ['*'];
310+
return sign(tmpDir, stubs, {extraArgs: {ignoreFiles}})
311+
.then(() => {
312+
assert.equal(stubs.signAddon.called, true);
313+
assert.equal(stubs.build.firstCall.args[0].ignoreFiles, ignoreFiles);
314+
});
315+
}
316+
));
317+
306318
it('passes through a signing exception', () => withTempDir(
307319
(tmpDir) => {
308320
const stubs = getStubs();

0 commit comments

Comments
 (0)