| avm99963 | bf0849a | 2020-08-08 16:16:04 +0200 | [diff] [blame] | 1 | # TW Power Tools |
| avm99963 | 03d5409 | 2020-01-18 21:33:16 +0100 | [diff] [blame] | 2 | [](https://chrome.google.com/webstore/detail/infinite-scroll-in-tw/hpgakoecmgibigdbnljgecablpipbajb) |
| 3 | |
| avm99963 | bf0849a | 2020-08-08 16:16:04 +0200 | [diff] [blame] | 4 | An extension which brings several enhancements to the Google Forums and the Community Console. |
| 5 | |
| avm99963 | 666575f | 2020-08-08 15:40:39 +0200 | [diff] [blame] | 6 | ## Release cycle |
| 7 | When the code in the `master` branch is considered to be stable, a release can be made. This is the procedure: |
| 8 | |
| 9 | 1. Tag the last commit with a version number (in the format `vx`, where x is the extension's [version number](https://developer.chrome.com/extensions/manifest/version) for that release) by running `git tag -a vx -m "vx"`. Note that the tag should be an annotated tag and not a lightweight tag, and it must be pushed to Gerrit after being created. |
| avm99963 | 6c35730 | 2020-08-09 19:54:08 +0200 | [diff] [blame] | 10 | 2. Build the extension for both the stable and beta channels (this is explained in the next section). This will output a ZIP file for each release channel and each supported browser. |
| 11 | |
| 12 | Afterwards, the release/build files must be submitted to the Chrome Web Store and addons.mozilla.org. |
| 13 | |
| 14 | ### Submitting to the Chrome Web Store |
| 15 | 1. [Upload both release files](https://developer.chrome.com/webstore/publish#upload-your-item) to the Chrome Web Store, one for each release channel. |
| 16 | 2. [Submit both releases](https://developer.chrome.com/webstore/publish#submit-your-item-for-publishing) to be reviewed by the Chrome Web Store team, but in the case of the stable channel uncheck the "Publish automatically after it has passed review" option. |
| 17 | 3. Upload the beta release file to the [GitHub releases page](https://github.com/avm99963/infinitegforums/releases) under the newly created tag. Mark that release as a pre-release at GitHub. |
| 18 | 4. Wait until the beta release is reviewed and approved by Google. |
| 19 | 5. Test again the extension by using the beta channel. Check if the options have been transfered correctly from version to version, and wait some days (for instance between 3 and 5 days) to see if other people report issues with the updated version. |
| 20 | 6. If everything goes well, publish the update in the stable channel. The updated version should have already been reviewed by the Chrome Web Store team at this time. |
| 21 | 7. Update the release file in the GitHub releases page by removing the beta release file and uploading the stable release file. Also, remove the pre-release label. |
| avm99963 | 666575f | 2020-08-08 15:40:39 +0200 | [diff] [blame] | 22 | |
| 23 | If during this process the release wasn't approved by Google or an issue was found during beta testing, a new release which fixes this should be created. |
| 24 | |
| avm99963 | 6c35730 | 2020-08-09 19:54:08 +0200 | [diff] [blame] | 25 | ### Submitting to addons.mozilla.org |
| 26 | The procedure is similar to the one with the Chrome Web Store. |
| 27 | |
| 28 | @TODO: Add more details once the first version of the extension has been uploaded to addons.mozilla.org. |
| 29 | |
| avm99963 | 666575f | 2020-08-08 15:40:39 +0200 | [diff] [blame] | 30 | ## Build the extension |
| avm99963 | 6c35730 | 2020-08-09 19:54:08 +0200 | [diff] [blame] | 31 | A zip file with the contents of the extension, which can be uploaded to the Chrome Web Store and addons.mozilla.org, can be created with any of the following procedures: |
| avm99963 | 03d5409 | 2020-01-18 21:33:16 +0100 | [diff] [blame] | 32 | |
| avm99963 | 6c35730 | 2020-08-09 19:54:08 +0200 | [diff] [blame] | 33 | ### Using the release.bash script |
| 34 | Run `bash release.bash -h` in order to learn how to use this command. To summarize, the command accepts the `--channel` and `--browser` flags (or their short versions `-c` and `-b`). |
| avm99963 | 666575f | 2020-08-08 15:40:39 +0200 | [diff] [blame] | 35 | |
| avm99963 | 6c35730 | 2020-08-09 19:54:08 +0200 | [diff] [blame] | 36 | As an example, if you wanted to create a ZIP file of the beta-branded extension targeted for Firefox, you would run `bash release.bash -c beta -b gecko`. |
| 37 | |
| 38 | ### Using make |
| 39 | You can also use _make_ to build the extension. This is just a wrapper for the `release.bash` command. |
| 40 | |
| 41 | Run `make all` to build the extension for all the available channels and browsers. You can also run `make {target}` where `{target}` is one of the following: `chromium-stable`, `chromium-beta`, `gecko-stable`, `gecko-beta`. |
| 42 | |
| 43 | Run `make clean` to clean all the release files (this removes the `out` folder, which is where the release files are saved). |
| avm99963 | 03d5409 | 2020-01-18 21:33:16 +0100 | [diff] [blame] | 44 | |
| Alex Ivanov | 4f3df18 | 2020-04-10 09:33:05 +0300 | [diff] [blame] | 45 | ## Testing notes |
| avm99963 | 6c35730 | 2020-08-09 19:54:08 +0200 | [diff] [blame] | 46 | When testing the extension during development, you don't have to build the extension each time you want to import an updated version to Chrome/Firefox. Instead, run `bash generateManifest.bash {browser}` once, where `{browser}` is either `chromium` or `gecko`, and this will generate a `manifest.json` file for the specified browser in the `src` directory. Now, you can load the `src` folder directly in the browser in order to import the extension, which removes the need to build it. When the `manifest.gjson` file is modified, you'll have to generate the manifest again. |
| 47 | |
| Alex Ivanov | 4f3df18 | 2020-04-10 09:33:05 +0300 | [diff] [blame] | 48 | To test translations, you might want to set your browser's locale. This section tells you how to set the locale in [Windows](https://developer.chrome.com/extensions/i18n#testing-win), [Mac OS X](https://developer.chrome.com/extensions/i18n#testing-mac), [Linux](https://developer.chrome.com/extensions/i18n#testing-linux), and [Chrome OS](https://developer.chrome.com/extensions/i18n#testing-chromeos). |
| avm99963 | 666575f | 2020-08-08 15:40:39 +0200 | [diff] [blame] | 49 | |
| 50 | ## Beta channel |
| avm99963 | 6c35730 | 2020-08-09 19:54:08 +0200 | [diff] [blame] | 51 | The beta channel for Chrome is available [here](https://chrome.google.com/webstore/detail/infinite-scroll-in-tw-bet/memmklnkkhifmflmidnflfcdepamljef). |