diff --git a/Makefile b/Makefile index 0bb797c6c..b2152c72e 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ crx_contents := script.js eventPage.js icon16.png icon48.png icon128.png manifes release := \ $(foreach f, \ - $(foreach c,. -beta.,$(name)$(c)crx updates$(c)xml $(name)$(c)user.js $(name)$(c)meta.js) \ + $(foreach c,. -beta.,$(name)$(c)crx updates$(c)xml updates$(c)json $(name)$(c)user.js $(name)$(c)meta.js) \ $(name)-noupdate.crx \ $(name)-noupdate.user.js \ $(name).zip \ @@ -184,6 +184,9 @@ testbuilds/crx$1/manifest.json : src/meta/manifest.json version.json $(template_ testbuilds/updates$1.xml : src/meta/updates.xml version.json $(template_deps) | testbuilds/crx$1 $(template) $$< $$@ type=crx channel=$1 +testbuilds/updates$1.json : src/meta/updates.json version.json $(template_deps) | testbuilds/crx$1 + $(template) $$< $$@ type=crx channel=$1 + testbuilds/$(name)$1.crx.zip : \ $(foreach f,$(crx_contents),testbuilds/crx$1/$(f)) \ package.json version.json tools/zip-crx.js node_modules/jszip/package.json @@ -342,7 +345,7 @@ stable : distready git push . HEAD:bstable git tag -af stable -m "$(meta_name) v$(version)." cd dist && git merge --no-commit -s ours stable - cd dist && git checkout stable "builds/$(name).*" builds/updates.xml + cd dist && git checkout stable "builds/$(name).*" builds/updates.xml builds/updates.json cd dist && git commit -am "Move $(meta_name) v$(version) to stable channel." web : index.html distready diff --git a/src/meta/manifest.json b/src/meta/manifest.json index dec9c0068..8438753bb 100644 --- a/src/meta/manifest.json +++ b/src/meta/manifest.json @@ -29,7 +29,8 @@ ], "applications": { "gecko": { - "id": "<%= meta.appidGecko %>" - } + "id": "<%= meta.appidGecko %>"<% if (channel !== '-noupdate') { %>, + "update_url": "<%= meta.downloads %>updates<%= channel %>.json" +<% } %> } } } diff --git a/src/meta/updates.json b/src/meta/updates.json new file mode 100644 index 000000000..dc9d876f6 --- /dev/null +++ b/src/meta/updates.json @@ -0,0 +1,12 @@ +{ + "addons": { + "<%= meta.appidGecko %>": { + "updates": [ + { + "version": "<%= readJSON('/version.json').version %>", + "update_link": "<%= meta.downloads %><%= name %><%= channel %>.crx" + } + ] + } + } +}