From 28685bd62fcfa157f8e9497bf1fdad3d24cff060 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Thu, 31 Dec 2015 14:02:06 +0100 Subject: [PATCH] Adjustments for extension signing --- documentation/tools.md | 14 +++++++++++++- extension/install.rdf.tmpl | 2 +- gulpfile.coffee | 9 ++++++--- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/documentation/tools.md b/documentation/tools.md index 0653538..9670a86 100644 --- a/documentation/tools.md +++ b/documentation/tools.md @@ -43,6 +43,11 @@ This section describes how to install and use the tools needed to: - Pressing ctrl+o and choosing it. - Using “Install from file…” in the top-right menu in the Add-ons Manager. +**Note:** Since Mozilla added [extension signing] things have gotten a bit more +complicated. + +[extension signing]: https://wiki.mozilla.org/Addons/Extension_Signing + ### Development 1. Create a new [Firefox profile] for development. @@ -88,6 +93,9 @@ internally by other tasks.) the tests are `console.log`ed. See the browser console, or start Firefox from the command line to see it. +- Use the `--unlisted` or `-u` option to append `-unlisted` to the extension ID. + This is used when adding .xpi files to github releases. + - `gulp clean` removes the `build/` directory. ### Management @@ -212,7 +220,11 @@ Steps: the publish on addons.mozilla.org, because sometimes its validator complains. This saves some commits.) -8. Make a “release” out of the new tag on github, and attach VimFx.xpi to it. +8. Make a “release” out of the new tag on github, and attach an .xpi to it: + + 1. Create the .xpi by running `gulp xpi --unlisted`. + 2. Sign it on AMO. + 3. Attach to the release. The idea is to use the contents of `README.md` as the add-on description on addons.mozilla.org. You can print it as HTML by running `gulp readme`. diff --git a/extension/install.rdf.tmpl b/extension/install.rdf.tmpl index 798da3f..81bfaef 100644 --- a/extension/install.rdf.tmpl +++ b/extension/install.rdf.tmpl @@ -5,7 +5,7 @@ VimFx - VimFx@akhodakivskiy.github.com + VimFx{{idSuffix}}@akhodakivskiy.github.com https://github.com/akhodakivskiy/VimFx {{version}} true diff --git a/gulpfile.coffee b/gulpfile.coffee index c5c419e..522f7bd 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -43,7 +43,9 @@ TEST = 'extension/test' BASE_LOCALE = 'en-US' -test = '--test' in process.argv or '-t' in process.argv +argv = process.argv.slice(2) + +test = '--test' in argv or '-t' in argv ifTest = (value) -> if test then [value] else [] {join} = path @@ -99,6 +101,7 @@ gulp.task('install.rdf', -> gulp.src('extension/install.rdf.tmpl') .pipe(template({ + idSuffix: if '--unlisted' in argv or '-u' in argv then '-unlisted' else '' version: pkg.version minVersion: pkg.firefoxVersions.min maxVersion: pkg.firefoxVersions.max @@ -185,7 +188,7 @@ gulp.task('release', (callback) -> gulp.task('changelog', -> num = 1 - for arg in process.argv when /^-[1-9]$/.test(arg) + for arg in argv when /^-[1-9]$/.test(arg) num = Number(arg[1]) entries = read('CHANGELOG.md').split(/^### .+/m)[1..num].join('') process.stdout.write(html(entries)) @@ -221,7 +224,7 @@ gulp.task('faster', -> gulp.task('sync-locales', -> baseLocale = BASE_LOCALE compareLocale = null - for arg in process.argv when arg[...2] == '--' + for arg in argv when arg[...2] == '--' name = arg[2..] if name[-1..] == '?' then compareLocale = name[...-1] else baseLocale = name -- 2.39.3