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

tuftool: Add clone subcommand #404

Merged
merged 3 commits into from
Aug 18, 2021
Merged

Commits on Aug 17, 2021

  1. tuftool: Add download_root module

    This change adds a `download_root` module, which abstracts the logic of
    downloading `root.json` out of `download` (the subcommand).  It also
    makes the HTTP request a bit more robust by handling the initial request
    error as well as a bad response.  Additionally, it avoids creating the
    file until after the request has succeeded to avoid creating cruft on
    the user's system.
    zmrow committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    f47cfbd View commit details
    Browse the repository at this point in the history
  2. tuftool: use download_root module in download

    This change updates the `download` module/subcommand to make use of the
    previously added `download_root` function.
    
    It also defines a default of "1" for the `root_version` argument.
    Previously, we effectively had this default in code by using
    `1.root.json` in the event the argument wasn't passed.  It also has the
    nice side effect of not needing to deal with an `Option` for this
    argument.
    zmrow committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    f1c886b View commit details
    Browse the repository at this point in the history
  3. tuftool: Add clone subcommand

    This adds a `clone` subcommand to `tuftool`, allowing a user to download
    a fully functioning TUF repository.  A user has the option to download a
    full repository, a subset of the targets, or just metadata.
    zmrow committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    e62cfee View commit details
    Browse the repository at this point in the history