[Bug build/34393] New: [pre-commit] Add autoupdate script

"vries at gcc dot gnu.org via Gdb-prs" <[email protected]>
Newsgroups gmane.comp.gdb.bugs.discuss
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=34393

            Bug ID: 34393
           Summary: [pre-commit] Add autoupdate script
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Pre-commit has the following autoupdate usage:
...
$ pre-commit autoupdate --help
usage: pre-commit autoupdate [-h] [--color {auto,always,never}] [-c CONFIG]
[--bleeding-edge]
                             [--freeze] [--repo REPO] [-j JOBS]

options:
  -h, --help            show this help message and exit
  --color {auto,always,never}
                        Whether to use color in output. Defaults to `auto`.
  -c, --config CONFIG   Path to alternate config file
  --bleeding-edge       Update to the bleeding edge of `HEAD` instead of the
latest tagged version
                        (the default behavior).
  --freeze              Store "frozen" hashes in `rev` instead of tag names
  --repo REPO           Only update this repository -- may be specified
multiple times.
  -j, --jobs JOBS       Number of threads to use. (default 1).
...

So the default behavior is: update to the latest tagged version.

For most tools this is fine, and not too frequent.

Isort however also tags pre-releases, so that has resulted in more frequent
updates:
...
$ git log .pre-commit-config.yaml| grep "Bump isort"
    [pre-commit] Bump isort to 9.0.0b1
    [pre-commit] Bump isort to 9.0.0a3
    [pre-commit] Bump isort to 9.0.0a2
    [pre-commit] Bump isort to 8.0.1
    [pre-commit] Bump isort to 8.0.0
...

We could add a script that does autoupdate for each hook individually, ignoring
pre-releases for isort.

This would also allow us to freeze certain hooks.  Note that --freeze is a
one-time thing.  A subsequent autoupdate without --freeze reverts the effect. 
Having a script do the autoupdate could also work around that.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.