morgan pushed to branch main at The Tor Project / Applications / tor-browser-build
Commits: 992a7009 by Pier Angelo Vendrame at 2024-11-21T17:23:09+01:00 Bug 41315: Fix the Mullvad Extension update in relprep.py.
- - - - - 900f9f91 by Pier Angelo Vendrame at 2024-11-21T17:28:46+01:00 Bug 41284: Stop sync'ing changelogs between channels.
- - - - -
1 changed file:
- tools/relprep.py
Changes:
===================================== tools/relprep.py ===================================== @@ -306,6 +306,7 @@ class ReleasePreparation: self.save_config("browser", config)
def update_addon_amo(self, config, name, addon_id): + logger.debug("Checking updates for %s", name) r = requests.get( f"https://services.addons.mozilla.org/api/v4/addons/addon/%7Baddon_id%7D" ) @@ -318,6 +319,7 @@ class ReleasePreparation: addon_input["sha256sum"] = addon["hash"][7:]
def update_mullvad_addon(self, config): + logger.debug("Checking updates for the Mullvad addon") input_ = self.find_input(config, "mullvad-extension") r = requests.get( "https://cdn.mullvad.net/browser-extension/updates.json" @@ -336,11 +338,11 @@ class ReleasePreparation:
path = self.base_path / "out/browser" / url.split("/")[-1] # The extension should be small enough to easily fit in memory :) - if not path.exists: + if not path.exists(): r = requests.get(url) r.raise_for_status() with path.open("wb") as f: - f.write(r.bytes) + f.write(r.content) with path.open("rb") as f: input_["sha256sum"] = sha256(f.read()).hexdigest() logger.debug("Mullvad extension downloaded and updated") @@ -546,14 +548,9 @@ class ReleasePreparation: changelogs = cb.create(**kwargs)
path = f"projects/browser/Bundle-Data/Docs-{tag_prefix.upper()}/ChangeLog.txt" - stable_tag = self.last_releases[(tag_prefix, "release")][0].tag - alpha_tag = self.last_releases[(tag_prefix, "alpha")][0].tag - if stable_tag.tagged_date > alpha_tag.tagged_date: - last_tag = stable_tag - else: - last_tag = alpha_tag - logger.debug("Using %s to add the new changelogs to.", last_tag.tag) - last_changelogs = self.repo.git.show(f"{last_tag.tag}:{path}") + # Take HEAD to reset any changes we might already have from a + # previous run. + last_changelogs = self.repo.git.show(f"HEAD:{path}") with (self.base_path / path).open("w") as f: f.write(changelogs + "\n" + last_changelogs + "\n")
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/a...
tbb-commits@lists.torproject.org