Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby/QL: Merge extractor binaries #12786

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

hmac
Copy link
Contributor

@hmac hmac commented Apr 7, 2023

Currently the Ruby and QL extractors consist of three binaries: extractor, autobuilder and generator. This PR merges them into a single binary, codeql-ruby-extractor, which takes a positional argument specifying what to do.

CodeQL Ruby extractor

Usage: codeql-ruby-extractor <COMMAND>

Commands:
  extract
  generate
  autobuild
  help       Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

The flags are identical to the old binaries:

Usage: codeql-ruby-extractor extract --source-archive-dir <SOURCE_ARCHIVE_DIR> --output-dir <OUTPUT_DIR> --file-list <FILE_LIST>

Options:
      --source-archive-dir <SOURCE_ARCHIVE_DIR>
          Sets a custom source achive folder
      --output-dir <OUTPUT_DIR>
          Sets a custom trap folder
      --file-list <FILE_LIST>
          A text file containing the paths of the files to extract
  -h, --help
          Print help


Usage: codeql-ruby-extractor autobuild

Options:
  -h, --help  Print help


Usage: codeql-ruby-extractor generate --dbscheme <DBSCHEME> --library <LIBRARY>

Options:
      --dbscheme <DBSCHEME>  Path of the generated dbscheme file
      --library <LIBRARY>    Path of the generated QLL file
  -h, --help                 Print help

hmac added 3 commits April 7, 2023 12:04
This allows nicer CLI definitions.
There is now one binary, codeql-ruby-extractor, which takes a positional
argument specifying whether to extract, generate or autobuild.
This allows nicer CLI definitions.
@hmac hmac force-pushed the merge-extractor-binaries branch from 48fd4bf to daa0c31 Compare April 7, 2023 04:15
hmac added 4 commits April 7, 2023 15:49
There is now one binary, codeql-ql-extractor, which takes a positional
argument specifying whether to extract, generate or autobuild.
@hmac hmac force-pushed the merge-extractor-binaries branch from daa0c31 to 2ef6d5c Compare April 7, 2023 07:49
This got lost in an earlier refactor.
@hmac hmac marked this pull request as ready for review April 7, 2023 09:32
@hmac hmac requested review from a team as code owners April 7, 2023 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant