[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser-build][maint-14.0] Bug 41273: Bump Firefox/GeckoView tag when does not match HEAD.



Title: GitLab

morgan pushed to branch maint-14.0 at The Tor Project / Applications / tor-browser-build

Commits:

  • 11cdd993
    by Pier Angelo Vendrame at 2024-10-17T16:05:28+02:00
    Bug 41273: Bump Firefox/GeckoView tag when does not match HEAD.
    
    If we detect the tag we would use for build does not match the HEAD of
    the branch we are using, bump it preemptively.
    Normally, we would add that tag when ready to build, so this change
    can help us in case we forget to.
    If the script is overzealous, we can change the build number before
    committing.
    

1 changed file:

Changes:

  • tools/relprep.py
    ... ... @@ -242,6 +242,7 @@ class ReleasePreparation:
    242 242
             logger.debug("About to fetch Firefox from %s.", remote)
    
    243 243
             repo.remotes["origin"].fetch()
    
    244 244
             tags = get_sorted_tags(repo)
    
    245
    +        tag_info = None
    
    245 246
             for t in tags:
    
    246 247
                 m = re.match(
    
    247 248
                     r"(\w+-browser)-([^-]+)-([\d\.]+)-(\d+)-build(\d+)", t.tag
    
    ... ... @@ -251,8 +252,21 @@ class ReleasePreparation:
    251 252
                     and m.group(1) == browser
    
    252 253
                     and m.group(3) == self.version.major
    
    253 254
                 ):
    
    255
    +                logger.debug("Matched tag %s.", t.tag)
    
    254 256
                     # firefox-version, rebase, build
    
    255
    -                return (m.group(2), int(m.group(4)), int(m.group(5)))
    
    257
    +                tag_info = [m.group(2), int(m.group(4)), int(m.group(5))]
    
    258
    +                break
    
    259
    +        if tag_info is None:
    
    260
    +            raise RuntimeError("No compatible tag found.")
    
    261
    +        branch = t.tag[: m.end(4)]
    
    262
    +        logger.debug("Checking if tag %s is head of %s.", t.tag, branch)
    
    263
    +        if t.object != repo.remotes["origin"].refs[branch].commit:
    
    264
    +            logger.info(
    
    265
    +                "Found new commits after tag %s, bumping the build number preemptively.",
    
    266
    +                t.tag,
    
    267
    +            )
    
    268
    +            tag_info[2] += 1
    
    269
    +        return tag_info
    
    256 270
     
    
    257 271
         def update_translations(self):
    
    258 272
             logger.info("Updating translations")
    
    ... ... @@ -373,9 +387,7 @@ class ReleasePreparation:
    373 387
     
    
    374 388
             source = self.find_input(config, "openssl")
    
    375 389
             # No need to update URL, as it uses a variable.
    
    376
    -        hash_url = (
    
    377
    -            f"https://github.com/openssl/openssl/releases/download/openssl-{version}/openssl-{version}.tar.gz.sha256"
    
    378
    -        )
    
    390
    +        hash_url = f"https://github.com/openssl/openssl/releases/download/openssl-{version}/openssl-{version}.tar.gz.sha256"
    
    379 391
             r = requests.get(hash_url)
    
    380 392
             r.raise_for_status()
    
    381 393
             source["sha256sum"] = r.text.strip()
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits