thom4parisot / grunt-crx

Grunt task used to package private Chrome Extensions.
https://npmjs.com/grunt-crx
MIT License
118 stars 21 forks source link

crx's manifest file doesnt have auto_update url #32

Closed constantx closed 11 years ago

constantx commented 11 years ago

Using this config:

staging:
        "src": "<%= dirs.extension_built_staging %>"
        "dest": '<%= dirs.dist_extension_staging %>/<%= files.extension_staging %>'
        "exclude": [ ".git", ".svn", "built.txt" ]
        "privateKey": "../extension/key.pem"
        "baseUrl": "<%= autoupdateURL.url_staging %>"

I'm a bit confused as to what this grunt task actually do with baseUrl.

I assume when passing in the baseUrl, the manifest.json will be populated with the update_url automatically.

Does this task create a updates.xml too?

thom4parisot commented 11 years ago

At the moment, the manifest.json remains untouched. So if you don't have any update_url inside it, it won't be added by the grunt task.

If you provide a baseURL (with an uppercased URL, the issue might lye there) to the grunt task AND an update_url in the manifest.json, an update.xml file will be created.

I think it should be explained better in the README as it's too implicit.

constantx commented 11 years ago

rad, I dig into the source and figure out the logic :) Would be much clearer with better readme for sure. Thanks!

constantx commented 11 years ago

Just to add, before I figure out that the updates.xml is generated by grunt-crx, I actually have a separate tasks to compile them based on the extension env. But now use that to compile the correct manifest's update_url instead and delegate to grunt-crx for generated the xml :)

thom4parisot commented 11 years ago

:+1:

thom4parisot commented 11 years ago

Feel free to add comments on #33 if you struggled doing stuff not covered by the README and the new use case I've listed.