You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: docs/releases.md
+83-59Lines changed: 83 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,73 +27,90 @@ _all commits on all branches and pull requests are automatically built_
27
27
28
28
## Preparing a Release (for Internal, Alpha, or Production via Play Store)
29
29
30
+
### Collect necessary identifiers for the new build
31
+
32
+
Before you can begin a new production release, it is necessary to take the following steps into consideration:
33
+
34
+
1. Find the current production version number. Using the strategy below, increment the version number to identify the state of the new release.
35
+
-**Choosing a new release version number**
36
+
- Build versions are defined using a three-place value, `X.X.X`. Each number in the version is incremented based on the priority of the version being released.
37
+
- For normally scheduled releases, the left-most value is incremented and the following two numbers "reset" to zero.
38
+
- Example: after release `2.1.0`, the next normally scheduled release would be version `3.0.0`.
39
+
- For smaller consecutive builds that come after a scheduled release (this could be bug fixes, etc.), the left-most value is maintained while the middle number is incremented.
40
+
- Example: after release `3.0.0`, a version may be titled `3.1.0`.
41
+
- For emergency hotfix/high priority/not scheduled releases, we may want to do a "point release". In this case, the left two values stay the same and the right-most value is incremented.
42
+
- Example: after release `3.1.0`, an emergency hotfix release would be titled `3.1.1`.
43
+
2. Before **public** release:
44
+
- make sure no open "localization strings" Pull Requests are open
45
+
3. After **public** release:
46
+
- Consider filing an issue for the next sprint/release to update to the latest dependencies (application-services, for example)
47
+
- Consider running `mkdocs gh-deploy` so the latest `docs` are also published to the GitHub pages website
48
+
- Consider changing the version to the next major/planned release version (depending on the future plans). Update the `versionName` value (and `versionCode` if applicable) in `app/build.gradle`
49
+
- Also update the value in the `list_cell_setting_appversion.xml` layout to _the exact same version_
50
+
- Make sure the `app-mapping.txt` (ProGuard rules) is uploaded to Sentry as part of the process earlier, do it now if not so your error reports are legible.
51
+
52
+
### Create a release branch and prepare the production branch
53
+
30
54
1. Update the release notes under `docs/release-notes.md`
31
-
-create a pull request to collaborate and get approval
32
-
-determine the next build number and include it in release notes
55
+
-determine the next build number (see above, "Choosing a new release version number") and include it in release notes
56
+
-create a pull request into the `master` branch and get approval
33
57
- merge the release notes to `master` branch
34
58
- this will result in a release build matching the build number provided
35
-
2. Create and merge a pull request _from_`master`_to_`production` so it tracks the release
- once the Bitrise checks pass, merge the branch into `production`
64
+
65
+
### Create the Play Store release
66
+
67
+
1. Create a tag from `production` matching the format: `major.minor.patch.buildNumber`
68
+
- Example:
69
+
-`1.2.1399` is major version 1.2, Bitrise build #1399
70
+
-`1.3.1.1624` is major version 1.3 with 1 patch release, Bitrise build #1624
40
71
-`git tag -a -s 1.3.1.1624 -m "1.3.1 (Build 1624)"`
41
-
4. push the tag to GitHub and create a corresponding "Release" on GitHub.com
72
+
2. Push the tag to GitHub and create a corresponding "Release" on GitHub
73
+
-`git push --tags` will push all local tags to origin
42
74
- mark this as a "pre-release" until PI requests are finished
43
75
- copy the release notes to the "Release" on GitHub
44
-
- download the `-signed.apk` from bitrise and attach it to the Release on GitHub
45
-
-**open the `-signed.apk` and confirm release build does not allow screenshots and does not expose the contents of the app in the switcher**
46
-
5. Upload the `-signed.apk` (from bitrise) to the [Play Console][2]:
76
+
3. Download the `-signed.apk` from Bitrise (found in "Apps & Artifacts" tab on the successful production deploy build) and attach it to the Release on GitHub
77
+
-**Important:** Open the `-signed.apk` and confirm release build does not allow screenshots and does not expose the contents of the app in the switcher
78
+
4. Upload the `-signed.apk` to the [Play Console][2]:
47
79
- browse to "Release Management" > "App Releases" > "Internal test track" > "Manage"
48
-
- "Create Release" and upload the signed APK, set the version to match the tag (for example: `1.2.1339`) then "Review" and the build will be immediately available to the core team
49
-
6. Download the `app-mapping.txt` (ProGuard rules) from bitrise and create an `AndroidManifest.xml` (in a local folder on your machine) to map the file to the specific build:
- Suggestion: rename the file to `AndroidManifest-BUILDNUMBER.xml` to make it less generic
59
-
7. [Create an auth token](https://sentry.prod.mozaws.net/settings/account/api/auth-tokens/) for your sentry account that will allow you to create releases. This will be used when uploading the `app-mapping` and `AndroidManifest`. If you have already created an auth token, there is no need to create a new one.
60
-
8. Browse to "Android Vitals" and "Deobfusication files" and upload the `app-mapping.txt` file from bitrise.io
80
+
- "Create Release" and upload the signed APK, set the version to match the github tag (for example: `1.2.1339`) then "Review" and the build will be immediately available to the core team
81
+
5. Download the `app-mapping.txt` (ProGuard rules) from Bitrise
61
82
- Suggestion: rename the file to `app-mapping-BUILDNUMBER.txt` to make it less generic
62
-
9. Upload the mapping and manifest to Sentry using `sentry-cli` and following [these instructions](https://docs.sentry.io/cli/dif/proguard/)
63
-
- The upload script should look something like this:
7. [Create an auth token](https://sentry.prod.mozaws.net/settings/account/api/auth-tokens/) for your sentry account that will allow you to create releases. This will be used when uploading the `app-mapping` and `AndroidManifest`.
96
+
- **Note:** if you have already created an auth token, there is no need to create a new one.
97
+
8. In Sentry, browse to "Android Vitals" and "Deobfusication files" and upload the `app-mapping.txt` file from step 6
98
+
- Upload the mapping and manifest to Sentry using `sentry-cli` and following [these instructions](https://docs.sentry.io/cli/dif/proguard/)
99
+
- The upload script should look something like this:
- HINT: if you get a 411 "content-length" error, you may need to add the `--no-reprocessing` flag due to a bug with GCP and the `sentry-cli`
68
-
10. Continue the "Distributing..." instructions
69
104
70
-
### In Case of Emergency (Release)
71
-
72
-
_similar to above, but requires explicit cherry-pick commits on `production` branch when `master` branch is not in a release-able state_
73
-
74
-
1. Merge the emergency changes or fixes or features to default `master` branch as usual
75
-
2. Update the release notes
76
-
3. Create and merge a pull request _up to and including_ the last release-able commit on `master` to `production`
77
-
4. Then `git cherry-pick` each additional commit from `master` to be included in the release
78
-
- thus skipping or avoiding the non-release-able commits
79
-
5. Push the resulting `production` branch to GitHub.com
80
-
6. Create a tag from `production` matching the format: `major.minor.patch.build`
81
-
- for example: `git tag -a -s 1.3.1.1624 -m "1.3.1 (Build 1624)"`
82
-
7. Push the tag to GitHub and create a corresponding "Release" on GitHub.com
83
-
- copy the release notes to the "Release" on GitHub
84
-
8. Browse to bitrise and find the desired `production` branch build to distribute
85
-
9. Follow the same instructions above starting at _Step 5_.
86
-
10. Continue the "Distributing..." instructions
87
-
88
-
## Distributing Builds through Play Store (Internal, Alpha)
105
+
### Distributing Builds through Play Store (Internal, Alpha)
89
106
90
107
_All builds must be manually uploaded from bitrise to Play Store Console as an artifact aka "New Release" in the "Preparing" instructions above. Only mobile engineering managers and Release Management team members (See #release-coordination) have access to create new non-production releases._
91
108
92
109
1. Browse to [App Releases][2] in Play Console
93
110
2. Browse to the "Internal test track" (this release should already be uploaded and available to the core Lockwise team)
94
111
3. Promote the release to the (internal, still) Alpha channel using the "Promote to Alpha" button, complete the questions
95
112
96
-
## Distributing through the Play Store (Production)
113
+
### Distributing through the Play Store (Production)
97
114
98
115
_Only Release Management team members (see private #release-coordination channel in Mozilla Slack) have access to distribute production releases through the Play Store._
99
116
@@ -104,16 +121,23 @@ _Only Release Management team members (see private #release-coordination channel
104
121
105
122
NOTE: _brand new_ apps may take 1 or more hours to appear in the Play Store whereas existing app (updates) can appear within minutes. Schedule accordingly!
106
123
107
-
## Preparation before and after a release
124
+
## In Case of Emergency (Release)
125
+
126
+
_similar to above, but requires explicit cherry-pick commits on `production` branch when `master` branch is not in a release-able state_
108
127
109
-
- **Before testing or distributing a release**: make sure the release number is still what you want and expect it to be, especially if major (versus minor) changes were made. (see below on how to _"change the version"_).
110
-
- **Before public release**: make sure no open "localization strings" Pull Requests are open
111
-
- **After public release**: consider filing an issue for the next sprint/release to update to the latest dependencies (application-services, for example)
112
-
- **After public release**: consider running `mkdocs gh-deploy` so the latest `docs` are also published to the GitHub pages website
113
-
- **After public release**: _change the version_ to a major or minor update depending on the future plans.
114
-
- Update the `versionName` value (and `versionCode` if applicable) in `app/build.gradle`
115
-
- Also update the value in the `list_cell_setting_appversion.xml` layout to _the exact same version_
116
-
- **After public release**: make sure the `app-mapping.txt` (ProGuard rules) is uploaded to Sentry as part of the process earlier, do it now if not so your error reports are legible.
128
+
1. Merge the emergency changes or fixes or features to default `master` branch as usual
129
+
2. Update the release notes
130
+
3. Create and merge a pull request _up to and including_ the last release-able commit on `master` to `production`
131
+
4. Then `git cherry-pick` each additional commit from `master` to be included in the release
132
+
- thus skipping or avoiding the non-release-able commits
133
+
5. Push the resulting `production` branch to GitHub.com
134
+
6. Create a tag from `production` matching the format: `major.minor.patch.build`
135
+
- for example: `git tag -a -s 1.3.1.1624 -m "1.3.1 (Build 1624)"`
136
+
7. Push the tag to GitHub and create a corresponding "Release" on github
137
+
- copy the release notes from `release-notes.md` to the Github release
138
+
8. Browse to bitrise and find the desired `production` branch build to distribute
139
+
9. Follow the same instructions above starting at _Step 5_.
0 commit comments