6

Since Chrome Extensions can't really be privately hosted using a .crx file and so being forced to use the Chrome Web Store, it's become quite a tedious manual process to upload and update an extension.

Is it possible to automate the publishing of a Chrome extension to the Chrome Web Store?

James Broad
  • 1,210
  • 12
  • 17
  • 1
    [Content scripts won't run on the Chrome Web Store unless the `--allow-scripting-gallery` flag is set.](http://stackoverflow.com/a/11614440/938089). I myself use Firefox to manage my published extensions, aided by an own Greasemonkey script. Updating the extension is quite easy though. Unless you want to push daily updates without change log, there's no difficulty in clicking "Edit", "Add new version", "Upload", , "Publish", . – Rob W Mar 08 '13 at 12:01
  • Sure they can be privately hosted, have a look at http://developer.chrome.com/extensions/external_extensions.html. Are you hosting it for internal use (i.e. inside a company)? – Hzmy Mar 08 '13 at 23:07
  • @Hzmy they don't mention on those docs that it is fairly pointless to have a self hosted version as it won't work unless you start Chrome with flags (--easy-off-store-extension-install) which 99.99% of users won't do. This is the Google documentation behind the banning of external extensions http://support.google.com/chrome_webstore/bin/answer.py?hl=en&answer=2664769&p=crx_warning – James Broad Mar 09 '13 at 10:05
  • Then forget those docs. The only other way is you'll need to create an installer to edit the `Preferences` file and insert the extension JSON object in there. I can post an answer up here if this is what you'd want? – Hzmy Mar 10 '13 at 13:14

2 Answers2

3

Chrome Web Store now has an API that makes publishing easy. Here is a sample desktop app using it.

Konrad Dzwinel
  • 36,825
  • 12
  • 98
  • 105
3

Konrad is right, there's new APIs (as of when the question was posted) to do this.

I've also written a blog post for this issue since I had trouble myself finding information on this: https://circleci.com/blog/continuously-deploy-a-chrome-extension/

The post is too long to really quote here, but the general idea is, in a CI environment:

  • use a Git and version strategy that meets your CI needs/workflow
  • prepare your extension code & assets (production vs dev, etc)
  • test your code
  • test browser support
  • remove unneeded files and zip up extension
  • use Chrome's APIs to upload .ZIP and then publish it
FelicianoTech
  • 3,894
  • 2
  • 13
  • 18