FooSoft / yomichan

Japanese pop-up dictionary extension for Chrome and Firefox.
https://foosoft.net/projects/yomichan
Other
1.06k stars 213 forks source link

Add support for auto-updating of Firefox testing builds #830

Closed toasted-nutbread closed 3 years ago

toasted-nutbread commented 3 years ago

https://stackoverflow.com/questions/40541561/firefox-web-extension-auto-update-unlisted-and-self-hosted-extension

toasted-nutbread commented 3 years ago

@FooSoft This would likely require doing one of the following:

  1. Maintaining an updates.json file on https://github.com/FooSoft/foosoft.github.io. E.g. https://foosoft.github.io/projects/yomichan/updates.json or https://foosoft.net/projects/yomichan/updates.json.

  2. Maintaining an updates.json file on an orphan branch of this repository which is visible as a gh-pages URL. E.g. https://foosoft.github.io/yomichan/updates.json or https://foosoft.net/yomichan/updates.json.

The release process would be:

We could have a checklist template that is pasted into the release issue to help remember what the process is.

Authoring security concerns

So I guess the takeaway is that supporting auto-updating using this repository directly assumes that collaborators are trustworthy and won't "secretly" change the update URLs or download links.

Other

Technically, it may be possible to use a raw URL (on https://raw.githubusercontent.com) for the updates.json file, but the Content-Type header is always text/plain, instead of application/json, which may cause it to not work. Untested and the documentation isn't clear on that point.

FooSoft commented 3 years ago

I think that hosting it on foosoft.net is probably the most straightforward way to go (option 1).

I'd change the URL to https://foosoft.net/projects/yomichan/dl/updates-testing.json, however as the files in the yomichan directory are mainly resources for the HTML there. Explicitly calling out the "testing" also seems like good idea, since Mozilla has already kicked Yomichan off their store once, and I would not be that surprised if at some point the extension has to be hosted outside of their ecosystem.

Speaking of testing releases, are we in a good state to queue up a new one?

toasted-nutbread commented 3 years ago

Sounds good to me.

Explicitly calling out the "testing" also seems like good idea ...

You can also use one updates.json file for multiple extension IDs.

Speaking of testing releases, are we in a good state to queue up a new one?

Most of the features are done for the release, and I'll be doing mostly testing for the next several days. I may do a bit of documentation updates/file organization as well. Right now a lot of new stuff is just dumped in /fg/, /bg/, or /mixed/, and there are probably some ways to clarify the organization.

FooSoft commented 3 years ago

Cool, did not know that you can put multiple extensions in one updates.json, I guess that solves that issue.