Upload beta source code for Mozilla reviewer
bovine3dom opened this issue · 6 comments
I'm hoping this is a once-every-4-years thingy rather than something that they want done manually for every single build:
Hello,
[Joe Bloggs], a reviewer at addons.mozilla.org, found an issue when reviewing version 1.21.1pre5616 of the add-on Tridactyl: Beta and requests additional information. You are receiving this email because you are listed as an author of this add-on.
[Joe Bloggs] wrote:
This version contains minified, concatenated or otherwise machine-generated code. Please provide the original sources, together with instructions on how to generate the final XPI. Source code must be provided as an archive and uploaded using the source code upload field, which can be done during submission or on the version page in the developer hub.
Please read through the instructions at https://extensionworkshop.com/documentation/publish/source-code-submission/ .
To respond, please reply to this email or visit https://addons.mozilla.org/en-US/developers/addon/tridactyl2/versions.
Thank you for your attention.
--
Mozilla Add-ons
https://addons.mozilla.org
Will need to do a little thinking about how to actually get this source code out with build instructions.
For the source code, you could use a zip snapshot of the repo, https://github.com/tridactyl/tridactyl/archive/<commit hash>.zip
.
Huh, I didn't realise you could do that with GitHub, that's neat.
For stable builds we generate a zip but I can't see where that's done at the momet
For the source code, you could use a zip snapshot of the repo,
https://github.com/tridactyl/tridactyl/archive/<commit hash>.zip
.
Unfortunately that's just the files that exist at that snapshot - the beta builds use details about the git repo in :version
so we need the whole repo
Then I'd make a temporary shallow clone and zip that up – maybe something like this:
#!/bin/sh
temp_repo="$(mktemp -d)"
git clone --depth 1 https://github.com/tridactyl/tridactyl "$temp_repo/tridactyl"
tar -czf tridactyl.tar.gz -C "$temp_repo" tridactyl
rm -rf "$temp_repo"
git clone --depth 1 file:///local/path/to/tridactyl "$temp_repo/tridactyl"
would also work
but mostly I haven't spent time on this because I knew that the following line existed somewhere:
Line 56 in ced62d5
(Which I found just now)
It's always ~100MB though so a shallow clone would be a good idea if we can get it to work
Edit: shallow clone in itself won't work because we use git rev-list --count HEAD
to generate the number after pre
.
I think I'll make scripts/version.js beta
output the version to a file somewhere, fall back to using that file if it exists and the git rev-list
thing fails?
tar --exclude-from=.gitignore -czf ../tri_source.tar.gz .
and then tell the reviewer to run scripts/sign nosignbeta