morgan pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits:
6 changed files:
- .gitlab/issue_templates/Release Prep - Mullvad Browser Alpha.md
- .gitlab/issue_templates/Release Prep - Mullvad Browser Stable.md
- .gitlab/issue_templates/Release Prep - Tor Browser Alpha.md
- .gitlab/issue_templates/Release Prep - Tor Browser Legacy.md
- .gitlab/issue_templates/Release Prep - Tor Browser Stable.md
- tools/relprep.py
Changes:
| ... | ... | @@ -70,7 +70,7 @@ Mullvad Browser Alpha (and Nightly) are on the `main` branch |
| 70 | 70 | - **NOTE**: We try to build incrementals for the previous 3 desktop versions
|
| 71 | 71 | - **⚠️ WARNING**: Really *actually* make sure this is the previous Desktop version or else the `make mullvadbrowser-incrementals-*` step will fail
|
| 72 | 72 | - [ ] `projects/firefox/config`
|
| 73 | - - [ ] `browser_build`: updated to match `mullvad-browser` tag
|
|
| 73 | + - [ ] `var/browser_build`: updated to match `mullvad-browser` tag
|
|
| 74 | 74 | - [ ] ***(Optional)*** `var/firefox_platform_version`: updated to latest `${ESR_VERSION}` if rebased
|
| 75 | 75 | - [ ] ***(Optional)*** `projects/translation/config`:
|
| 76 | 76 | - [ ] `steps/base-browser/git_hash`: updated with `HEAD` commit of project's `base-browser` branch
|
| ... | ... | @@ -69,7 +69,7 @@ Mullvad Browser Stable is on the `maint-${MULLVAD_BROWSER_MAJOR}.${MULLVAD_BROWS |
| 69 | 69 | - **NOTE**: We try to build incrementals for the previous 3 desktop versions
|
| 70 | 70 | - **⚠️ WARNING**: Really *actually* make sure this is the previous Desktop version or else the `make mullvadbrowser-incrementals-*` step will fail
|
| 71 | 71 | - [ ] `projects/firefox/config`
|
| 72 | - - [ ] `browser_build`: updated to match `mullvad-browser` tag
|
|
| 72 | + - [ ] `var/browser_build`: updated to match `mullvad-browser` tag
|
|
| 73 | 73 | - [ ] ***(Optional)*** `var/firefox_platform_version`: updated to latest `${ESR_VERSION}` if rebased
|
| 74 | 74 | - [ ] ***(Optional)*** `projects/translation/config`:
|
| 75 | 75 | - [ ] `steps/base-browser/git_hash`: updated with `HEAD` commit of project's `base-browser` branch
|
| ... | ... | @@ -70,11 +70,13 @@ Tor Browser Alpha (and Nightly) are on the `main` branch |
| 70 | 70 | - **NOTE**: We try to build incrementals for the previous 3 desktop versions
|
| 71 | 71 | - **⚠️ WARNING**: Really *actually* make sure this is the previous Desktop version or else the `make torbrowser-incrementals-*` step will fail
|
| 72 | 72 | - [ ] `projects/firefox/config`
|
| 73 | - - [ ] `browser_build`: updated to match `tor-browser` tag
|
|
| 73 | + - [ ] `var/browser_build`: updated to match `tor-browser` tag
|
|
| 74 | 74 | - [ ] ***(Optional)*** `var/firefox_platform_version`: updated to latest `${ESR_VERSION}` if rebased
|
| 75 | 75 | - [ ] `projects/geckoview/config`
|
| 76 | - - [ ] `browser_build`: updated to match `tor-browser` tag
|
|
| 76 | + - [ ] `var/browser_build`: updated to match `tor-browser` tag
|
|
| 77 | 77 | - [ ] ***(Optional)*** `var/firefox_platform_version`: updated to latest `${ESR_VERSION}` if rebased
|
| 78 | + - [ ] ***(Optional)*** `projects/application-services/config`
|
|
| 79 | + - [ ] `var/build_number`: updated to match `application-services` tag
|
|
| 78 | 80 | - [ ] ***(Optional)*** `projects/translation/config`:
|
| 79 | 81 | - [ ] `steps/base-browser/git_hash`: updated with `HEAD` commit of project's `base-browser` branch
|
| 80 | 82 | - [ ] `steps/tor-browser/git_hash`: updated with `HEAD` commit of project's `tor-browser` branch
|
| ... | ... | @@ -100,7 +102,7 @@ Tor Browser Alpha (and Nightly) are on the `main` branch |
| 100 | 102 | - [ ] **(Optional)** `projects/go/config` https://go.dev/dl
|
| 101 | 103 | - **NOTE**: In general, Tor Browser Alpha uses the latest Stable major series Go version, but there are sometimes exceptions. Check with the anti-censorship team before doing a major version update in case there is incompatibilities.
|
| 102 | 104 | - [ ] `version`: updated go version
|
| 103 | - - [ ] `input_files/sha256sum` for `go`: update sha256sum of archive (sha256 sums are displayed on the go download page)
|
|
| 105 | + - [ ] `var/source_sha256sum` for `go`: update sha256sum of archive (sha256 sums are displayed on the go download page)
|
|
| 104 | 106 | - [ ] **(Optional)** `projects/manual/config`
|
| 105 | 107 | - [ ] `version`: updated to latest pipeline id
|
| 106 | 108 | - [ ] `input_files/shasum` for `manual`: updated to manual hash
|
| ... | ... | @@ -67,7 +67,7 @@ Tor Browser Legacy is on the `maint-13.5` branch |
| 67 | 67 | - **NOTE**: We try to build incrementals for the previous 3 desktop versions
|
| 68 | 68 | - **⚠️ WARNING**: Really *actually* make sure this is the previous Desktop version or else the `make torbrowser-incrementals-*` step will fail
|
| 69 | 69 | - [ ] `projects/firefox/config`
|
| 70 | - - [ ] `browser_build`: updated to match `tor-browser` tag
|
|
| 70 | + - [ ] `var/browser_build`: updated to match `tor-browser` tag
|
|
| 71 | 71 | - [ ] ***(Optional)*** `var/firefox_platform_version`: updated to latest `${ESR_VERSION}` if rebased
|
| 72 | 72 | - [ ] ***(Optional)*** `projects/translation/config`:
|
| 73 | 73 | - [ ] `steps/base-browser/git_hash`: updated with `HEAD` commit of project's `base-browser` branch
|
| ... | ... | @@ -71,10 +71,10 @@ Tor Browser Stable is on the `maint-${TOR_BROWSER_MAJOR}.${TOR_BROWSER_MINOR}` b |
| 71 | 71 | - [ ] `var/torbrowser_legacy_version`: updated to latest legacy Tor Browser version
|
| 72 | 72 | - [ ] `var/torbrowser_legacy_platform_version`: updated to latest legacy Tor Browser ESR version
|
| 73 | 73 | - [ ] `projects/firefox/config`
|
| 74 | - - [ ] `browser_build`: updated to match `tor-browser` tag
|
|
| 74 | + - [ ] `var/browser_build`: updated to match `tor-browser` tag
|
|
| 75 | 75 | - [ ] ***(Optional)*** `var/firefox_platform_version`: updated to latest `${ESR_VERSION}` if rebased
|
| 76 | 76 | - [ ] `projects/geckoview/config`
|
| 77 | - - [ ] `browser_build`: updated to match `tor-browser` tag
|
|
| 77 | + - [ ] `var/browser_build`: updated to match `tor-browser` tag
|
|
| 78 | 78 | - [ ] ***(Optional)*** `var/firefox_platform_version`: updated to latest `${ESR_VERSION}` if rebased
|
| 79 | 79 | - [ ] ***(Optional)*** `projects/translation/config`:
|
| 80 | 80 | - [ ] `steps/base-browser/git_hash`: updated with `HEAD` commit of project's `base-browser` branch
|
| ... | ... | @@ -101,7 +101,7 @@ Tor Browser Stable is on the `maint-${TOR_BROWSER_MAJOR}.${TOR_BROWSER_MINOR}` b |
| 101 | 101 | - [ ] **(Optional)** `projects/go/config` https://go.dev/dl
|
| 102 | 102 | - **NOTE**: In general, Tor Browser Alpha uses the latest Stable major series Go version, but there are sometimes exceptions. Check with the anti-censorship team before doing a major version update in case there is incompatibilities.
|
| 103 | 103 | - [ ] `version`: updated go version
|
| 104 | - - [ ] `input_files/sha256sum` for `go`: update sha256sum of archive (sha256 sums are displayed on the go download page)
|
|
| 104 | + - [ ] `var/source_sha256sum for `go`: update sha256sum of archive (sha256 sums are displayed on the go download page)
|
|
| 105 | 105 | - [ ] **(Optional)** `projects/manual/config`
|
| 106 | 106 | - [ ] `version`: updated to latest pipeline id
|
| 107 | 107 | - [ ] `input_files/shasum` for `manual`: updated to manual hash
|
| ... | ... | @@ -126,6 +126,7 @@ class ReleasePreparation: |
| 126 | 126 | self.branch_sanity_check()
|
| 127 | 127 | |
| 128 | 128 | self.update_firefox()
|
| 129 | + self.update_application_services()
|
|
| 129 | 130 | self.update_translations()
|
| 130 | 131 | self.update_addons()
|
| 131 | 132 | |
| ... | ... | @@ -268,6 +269,50 @@ class ReleasePreparation: |
| 268 | 269 | tag_info[2] += 1
|
| 269 | 270 | return tag_info
|
| 270 | 271 | |
| 272 | + def update_application_services(self):
|
|
| 273 | + if not self.android:
|
|
| 274 | + return
|
|
| 275 | + |
|
| 276 | + logger.info("Updating application-services")
|
|
| 277 | + config = self.load_config("application-services")
|
|
| 278 | + tag = self._get_application_services_tag(config)
|
|
| 279 | + build_number = tag[0]
|
|
| 280 | + |
|
| 281 | + config["var"]["build_number"] = build_number
|
|
| 282 | + self.save_config("application-services", config)
|
|
| 283 | + logger.debug("application-services configuration saved")
|
|
| 284 | + |
|
| 285 | + def _get_application_services_tag(self, config):
|
|
| 286 | + version = config["version"]
|
|
| 287 | + branch = f"{version}-TORBROWSER"
|
|
| 288 | + |
|
| 289 | + repo = Repo(self.base_path / "git_clones/application-services")
|
|
| 290 | + logger.debug("About to fetch application-services")
|
|
| 291 | + repo.remotes["origin"].fetch()
|
|
| 292 | + |
|
| 293 | + tags = get_sorted_tags(repo)
|
|
| 294 | + tag_info = None
|
|
| 295 | + for t in tags:
|
|
| 296 | + logger.debug("tag: %s", t.tag)
|
|
| 297 | + m = re.match(
|
|
| 298 | + rf"v{branch}-build(\d+)", t.tag
|
|
| 299 | + )
|
|
| 300 | + if m:
|
|
| 301 | + logger.debug("Matched tag %s", t.tag)
|
|
| 302 | + tag_info = [int(m.group(1))]
|
|
| 303 | + break
|
|
| 304 | + if tag_info is None:
|
|
| 305 | + raise RuntimeError("No compatible tag found.")
|
|
| 306 | + logger.debug("Checking if tag %s is head of %s.", t.tag, branch)
|
|
| 307 | + if t.object != repo.remotes["origin"].refs[branch].commit:
|
|
| 308 | + logger.info(
|
|
| 309 | + "Found new commits after tag %s, bumping the build number preemptively.",
|
|
| 310 | + t.tag,
|
|
| 311 | + )
|
|
| 312 | + tag_info[0] += 1
|
|
| 313 | + |
|
| 314 | + return tag_info
|
|
| 315 | + |
|
| 271 | 316 | def update_translations(self):
|
| 272 | 317 | logger.info("Updating translations")
|
| 273 | 318 | repo = Repo(self.base_path / "git_clones/translation")
|