Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
GitHub Docs

resolve upgrades

[Deep plumbing] Determine upgrades to run for a raw dataset.

Who can use this feature?

CodeQL is available for the following repository types:

Note

This content describes the most recent release of the CodeQL CLI. For more information about this release, seehttps://github.com/github/codeql-cli-binaries/releases.

To see details of the options available for this command in an earlier release, run the command with the--help option in your terminal.

Synopsis

Shell
codeql resolve upgrades --dbscheme=<file> <options>...

Description

[Deep plumbing] Determine upgrades to run for a raw dataset.

Determine which upgrades need to be performed on a particular raw QLdataset to bring it up to the state of the configured QL libraries. Thiscomputation is part of what happens during an ordinary database upgrade,and is exposed as a separate plumbing command in order to (a) help withtroubleshooting, and (b) provide a starting point for modifying the pathin extraordinary cases where exact control is needed.

Options

Primary Options

--dbscheme=<file>

[Mandatory] Thecurrent dbscheme of the dataset we want to upgrade.

--format=<fmt>

Select output format. Choices include:

lines(default): Print upgrade scripts on one line each.

json: Print a JSON array of upgrade script paths.

--just-check

Don't print any output, but exit with code 0 if there are upgrades todo, and code 1 if there are none.

Options from the invoking command's command line

--search-path=<dir>[:<dir>...]

A list of directories under which QL packs containing upgrade recipesmay be found. Each directory can either be a QL pack (or bundle of packscontaining a.codeqlmanifest.json file at the root) or the immediateparent of one or more such directories.

If the path contains directories trees, their order defines precedencebetween them: if a pack name that must be resolved is matched in morethan one of the directory trees, the one given first wins.

Pointing this at a checkout of the open-source CodeQL repository oughtto work when querying one of the languages that live there.

(Note: On Windows the path separator is;).

--additional-packs=<dir>[:<dir>...]

[Advanced] If this list of directories is given, they will be searchedfor upgrades before the ones in--search-path. The order between thesedoesn't matter; it is an error if a pack name is found in two differentplaces through this list.

This is useful if you're temporarily developing a new version of a packthat also appears in the default path. On the other hand it isnotrecommended to override this option in a config file; some internalactions will add this option on the fly, overriding any configuredvalue.

(Note: On Windows the path separator is;).

--target-dbscheme=<file>

Thetarget dbscheme we want to upgrade to. If this is not given, amaximal upgrade path will be constructed

--target-sha=<sha>

[Advanced] An alternative to--target-dbscheme that gives theinternal hash of the target dbscheme instead of the dbscheme file.

--[no-]allow-downgrades

Include any relevant downgrades if there are no upgrades

Common options

-h, --help

Show this help text.

-J=<opt>

[Advanced] Give option to the JVM running the command.

(Beware that options containing spaces will not be handled correctly.)

-v, --verbose

Incrementally increase the number of progress messages printed.

-q, --quiet

Incrementally decrease the number of progress messages printed.

--verbosity=<level>

[Advanced] Explicitly set the verbosity level to one of errors,warnings, progress, progress+, progress++, progress+++. Overrides-vand-q.

--logdir=<dir>

[Advanced] Write detailed logs to one or more files in the givendirectory, with generated names that include timestamps and the name ofthe running subcommand.

(To write a log file with a name you have full control over, insteadgive--log-to-stderr and redirect stderr as desired.)

--common-caches=<dir>

[Advanced] Controls the location of cached data on disk that willpersist between several runs of the CLI, such as downloaded QL packs andcompiled query plans. If not set explicitly, this defaults to adirectory named.codeql in the user's home directory; it will becreated if it doesn't already exist.

Available sincev2.15.2.


[8]ページ先頭

©2009-2025 Movatter.jp