Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

fix: exit successfully when submitting a listed add-on #91

Merged
merged 12 commits into from
Mar 17, 2020
Merged

Conversation

iamogbz
Copy link
Contributor

@iamogbz iamogbz commented Mar 16, 2020

Description

Complete fix from #88

Checklist

  • This PR has updated documentation
  • This PR has sufficient testing

DevQA

N/A

Comments

N/A

@@ -46,14 +49,9 @@ const publish = async options => {
},
{ signAddon },
)
if (!success) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

success === false is never returned from webExt.cmd.sign. Instead an error is already thrown. https://github.com/mozilla/web-ext/blob/b27863dd6073e69e95faa853b6859e6337dcda6a/src/cmd/sign.js#L134-L141

Comment on lines +29 to +32
fs.writeFileSync(
path.join(artifactsDir, unsignedXpiFile),
fs.readFileSync(params.xpiPath),
)
Copy link
Contributor Author

@iamogbz iamogbz Mar 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could not use fs.copyFileSync as it did not play well with unionfs. See streamich/unionfs/issues/429

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's necessary to copy the file as the defaultAddonSigner uses a temporary folder that gets cleaned up on success or failure.


module.exports = fs
module.exports = ufs.use(vol).use(fs)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combining memfs and node fs to allow tests mock and access to files written by web-ext build step.

@iamogbz iamogbz requested a review from dbasilio March 16, 2020 21:12

module.exports = fs
const { createWriteStream } = ufs
ufs.createWriteStream = (...args) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamogbz iamogbz merged commit da4a362 into master Mar 17, 2020
@iamogbz iamogbz deleted the test-fix-88 branch March 17, 2020 10:03
@iamogbz
Copy link
Contributor Author

iamogbz commented Mar 17, 2020

🎉 This PR is included in version 0.2.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant