|
| 1 | +# Release a new version |
| 2 | + |
| 3 | +1) Update extension version |
| 4 | + |
| 5 | +The current version on github should already be `${YOUR_VERSION}pre`. |
| 6 | +The version is set in `Makefile` header, in a `VERSION` variable. |
| 7 | +So your first task will be to remove the `pre` suffix. |
| 8 | +For example, if we were about to release 0.12.1, Makefile should already be set to: |
| 9 | +``` |
| 10 | + VERSION=0.12.1pre |
| 11 | +``` |
| 12 | +And, while releasing, you have to update that variable to: |
| 13 | +``` |
| 14 | + VERSION=0.12.1 |
| 15 | +``` |
| 16 | + |
| 17 | +2) Commit that change |
| 18 | + |
| 19 | +``` |
| 20 | +$ git commit -m "Release 0.12.1" Makefile |
| 21 | +``` |
| 22 | + |
| 23 | +3) Get AWS keys to sign *and* upload the extension |
| 24 | + |
| 25 | +For all the informations about how to sign the extension, and get keys, see: |
| 26 | + https://mana.mozilla.org/wiki/display/SVCOPS/Sign+a+Mozilla+Internal+Extension |
| 27 | +To get keys used for uploading the extension, please use this bug as a template for you: |
| 28 | + https://bugzilla.mozilla.org/show_bug.cgi?id=1481123 |
| 29 | + |
| 30 | +4) Build the extension |
| 31 | + |
| 32 | +This step is simple, just do: |
| 33 | +``` |
| 34 | + $ make |
| 35 | +``` |
| 36 | +It will create under the dist/ folder: |
| 37 | +- `adb-extension-0.12.1-linux.xpi` |
| 38 | +- `adb-extension-0.12.1-linux64.xpi` |
| 39 | +- `adb-extension-0.12.1-win32.xpi` |
| 40 | +- `adb-extension-0.12.1-mac64.xpi`. |
| 41 | + |
| 42 | +5) Setup `sign-xpi` tool, used to sign the extension |
| 43 | + |
| 44 | +``` |
| 45 | + git clone https://github.com/mozilla-services/sign-xpi/ |
| 46 | + # We need to checkout this revision since we are currently updating and testing a new implementation |
| 47 | + cd sign-xpi/cli |
| 48 | + git checkout 291a3e22ddb100772a452264c2827daaf4ac5774 |
| 49 | + virtualenv venv |
| 50 | + source venv/bin/activate |
| 51 | + pip install -e . |
| 52 | +``` |
| 53 | + |
| 54 | +After that, you can verify that `sign-xpi` is in your path by running it: |
| 55 | +``` |
| 56 | + $ sign-xpi |
| 57 | + Traceback (most recent call last): |
| 58 | + File "/home/alex/adbhelper/sign-xpi/cli/venv/bin/sign-xpi", line 11, in <module> |
| 59 | + ... |
| 60 | + raise NoRegionError() |
| 61 | + botocore.exceptions.NoRegionError: You must specify a region. |
| 62 | +``` |
| 63 | +(`sign-xpi` throws when no arguments are given, but it means it is in your path!) |
| 64 | + |
| 65 | +You may also want to install amazon AWS cli tool, if you don't have it installed yet: |
| 66 | +``` |
| 67 | + $ pip install awscli --upgrade |
| 68 | +``` |
| 69 | +(Note that it will install it in the virtualenv, and will only be available from it) |
| 70 | + |
| 71 | +You might need to first uninstall it |
| 72 | + |
| 73 | +``` |
| 74 | + $ pip uninstall awscli |
| 75 | +``` |
| 76 | + |
| 77 | +If you get dependency issues with botocore, try uninstalling and reinstalling it as well |
| 78 | + |
| 79 | +``` |
| 80 | + $ pip uninstall botocore boto3 && pip install boto3 |
| 81 | +``` |
| 82 | + |
| 83 | + |
| 84 | +6) Test your extension |
| 85 | + |
| 86 | +In step 3, you should have received two set of signing keys. |
| 87 | +One for "production", and another for "stage". |
| 88 | +You can use the stage one in order to test your extension. |
| 89 | +Pick the xpi file related to your operating system and do: |
| 90 | +``` |
| 91 | +$ SIGN_AWS_SECRET_ACCESS_KEY=xxx SIGN_AWS_ACCESS_KEY_ID=xxx ./sign.sh adb-extension-0.12.1-linux64.xpi |
| 92 | +Signing adb-extension-0.12.1-linux64.xpi |
| 93 | +{"uploaded": {"bucket": "net-mozaws-prod-addons-signxpi-output", "key": "adb-extension-0.12.1-linux64.xpi"}} |
| 94 | +download: s3://net-mozaws-prod-addons-signxpi-output/adb-extension-0.12.1-linux64.xpi to ./adb-extension-0.12.1-linux64.xpi |
| 95 | +``` |
| 96 | +The xpi file should now be signed and be installable in Firefox. |
| 97 | +Please test your extension now. |
| 98 | + |
| 99 | +7) Release the extension |
| 100 | + |
| 101 | +If the extension works fine after testing it, you can release it via: |
| 102 | +``` |
| 103 | + SIGN_AWS_SECRET_ACCESS_KEY=xxx SIGN_AWS_ACCESS_KEY_ID=xxx AWS_SECRET_ACCESS_KEY=xxx AWS_ACCESS_KEY_ID=xxx make release |
| 104 | +``` |
| 105 | + |
| 106 | +SIGN_AWS_SECRET_ACCESS_KEY and SIGN_AWS_ACCESS_KEY_ID are the credential to sign the extension, |
| 107 | +while AWS_SECRET_ACCESS_KEY and AWS_ACCESS_KEY_ID are the one to upload it. |
| 108 | + |
| 109 | +8) Push the release to github |
| 110 | + |
| 111 | +``` |
| 112 | +$ git tag 0.12.1 |
| 113 | +$ git push upstream 0.12.1 |
| 114 | +``` |
| 115 | + |
| 116 | +9) Update master's current version |
| 117 | + |
| 118 | +Go edit Makefile again to bump to the next "pre" version: |
| 119 | +``` |
| 120 | + VERSION=0.12.2pre |
| 121 | +``` |
| 122 | +And commit and push that change to master branch: |
| 123 | +``` |
| 124 | + $ git commit -m "Bump to 0.12.2pre" Makefile |
| 125 | + $ git push upstream HEAD:master |
| 126 | +``` |
| 127 | + |
0 commit comments