Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command to sign web extensions #151

Merged
merged 2 commits into from
Mar 28, 2016
Merged

Command to sign web extensions #151

merged 2 commits into from
Mar 28, 2016

Conversation

kumar303
Copy link
Contributor

Fixes #145

NOTE: this depends on mozilla/sign-addon#14 which also needs to be released to NPM before the tests in this pull request will pass.

signing works!

$ web-ext sign --api-key ... --api-secret ... --api-url-prefix https://addons-dev.allizom.org/api/v3
Created temporary directory: /var/folders/h7/rttdqkks7fl_txp9_rr4j4840000gn/T/tmp-web-ext-25722PO7exnQqnPrc
Validating manifest at /Users/kumar/dev/bookmarker-ext/moz-webext/manifest.json
Building web extension from /Users/kumar/dev/bookmarker-ext/moz-webext
Using manifest [email protected]
Not including file /Users/kumar/dev/bookmarker-ext/moz-webext/.DS_Store in ZIP archive
Not including file /Users/kumar/dev/bookmarker-ext/moz-webext/web-ext-artifacts/getting_started_example-1.2.19-fx.xpi in ZIP archive
Not including file /Users/kumar/dev/bookmarker-ext/moz-webext/web-ext-artifacts/getting_started_example-1.2.21-fx.xpi in ZIP archive
Your web extension is ready: /var/folders/h7/rttdqkks7fl_txp9_rr4j4840000gn/T/tmp-web-ext-25722PO7exnQqnPrc/getting_started_example-1.2.22.xpi
Validating add-on [..........................................................................................................................................................................................................................................................]Validation results: https://addons-dev.allizom.org/en-US/developers/upload/8865b96e71f942f5940b4cba0ee3825b
Downloading signed files: 100%
Downloaded:
    ./web-ext-artifacts/getting_started_example-1.2.22-fx.xpi
SUCCESS
Removing temporary directory: /var/folders/h7/rttdqkks7fl_txp9_rr4j4840000gn/T/tmp-web-ext-25722PO7exnQqnPrc

There's no point in managing two linters. Also, jscs is choking on some Flow syntax.
@kumar303 kumar303 force-pushed the sign branch 2 times, most recently from 60a1c25 to 3d9359a Compare March 25, 2016 17:30
return sign(tmpDir.path(), stubs)
.then(() => {
assert.equal(stubs.signAddon.called, true);
assert.equal(stubs.signAddon.firstCall.args[0].apiKey,
Copy link
Member

Choose a reason for hiding this comment

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

Nit, how about assigning stubs.signAddon.firstCall.args[0] to a shorter variable name (e.g. let signAddonArg = ...) to make this sequence of assertions a bit more readable?

@rpl
Copy link
Member

rpl commented Mar 28, 2016

looks good to me

NOTE: tests are currently failing on travis because the sign-addon package is not yet on the npm registry, but they successfully complete locally, by linking the sign-addon into the local node_modules dir.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 99.029% when pulling 95c2d50 on kumar303:sign into a13ac13 on mozilla:master.

@kumar303
Copy link
Contributor Author

The tests are passing after I published sign-addon. Thanks for the review!

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

Successfully merging this pull request may close these issues.

Add command to sign a web extension
3 participants