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

clap-v4 support for hab cli #9330

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

Commits on Aug 26, 2024

  1. clap-v4 support for hab cli

    Starting with some `cfg` trickery to make sure we continue to build old
    stuff. Very very experimental.
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    7ba6932 View commit details
    Browse the repository at this point in the history
  2. Moved KeyType into it's own module

    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    db971cc View commit details
    Browse the repository at this point in the history
  3. Getting started with hab pkg commands

    Initial skeleton for `hab pkg` command with Clap v4. This functionality
    gets enabled only with `v4` feature (off by default). Thus we continue
    to work with existing functionality.
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    ab1cb83 View commit details
    Browse the repository at this point in the history
  4. Initial implementation of hab pkg binds

    The command `hab pkg binds <PKG_IDENT>` runs and the outputs with
    `clap-v2` and `clap-v4` are comparable. Early still, but we can now
    implement more commands like this.
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    5f92645 View commit details
    Browse the repository at this point in the history
  5. hab pkg ... implementations

    - Initial implementation of `hab pkg binds`
    - Initial implementation of `hab pkg binlink`
    - Initial implementation of `hab pkg path`
    - Initial implementation of `hab pkg build`
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    0608919 View commit details
    Browse the repository at this point in the history
  6. Added a few more hab pkg ... commands

    - Added `hab pkg config` command
    - Added `hab pkg env` command
    - Added `hab pkg hash` command
    - Added `hab pkg header` command
    - Added `hab pkg info` command
    - Added `hab pkg verify` command
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    8bc998a View commit details
    Browse the repository at this point in the history
  7. Fixed issues while compiling on Linux

    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    c1b5c9c View commit details
    Browse the repository at this point in the history
  8. Support for pkg add bulkupload command

    Also fixed issue with building on macos due to `#[cfg(....)]` in
    `do_build`.
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    e2481b3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    bfdafa8 View commit details
    Browse the repository at this point in the history
  10. Rebase with latest main

    Removed the `hab bldr job` from `main_v2`
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    15e125d View commit details
    Browse the repository at this point in the history
  11. Implementation of more hab pkg commands

    - Implemented `hab pkg channels` command
    - Implemented `hab pkg demote` command
    - Implemented `hab pkg dependencies` command
    - Implemented `hab pkg download` command
    - Implemented `hab pkg promote` command
    
    Also added an API in `PackageSetFile` to get `Vec<PackageSet>` from the
    `toml` file.
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    99b1c36 View commit details
    Browse the repository at this point in the history
  12. Implementation of hab pkg list command

    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    5d7cbed View commit details
    Browse the repository at this point in the history
  13. Making v2 or v4 as default

    It should be possible to make either `v2` or `v4` feature as default.
    Initially when we were using `v4`, `v2` was also being used. Now `v4`
    can be opted in stand alone without `v2`. This reduces number of
    compiled packages by about 15.
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    814518d View commit details
    Browse the repository at this point in the history
  14. Few more hab pkg ... commands

    - `hab pkg exec`
    - `hab pkg export`
    - `hab pkg provides`
    - `hab pkg search`
    - `hab pkg sign`
    - `hab pkg upload`
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    4575396 View commit details
    Browse the repository at this point in the history
  15. All hab pkg ... commands completed

    - Added `hab pkg install`
    - Added `hab pkg uninstall`
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    7bbf772 View commit details
    Browse the repository at this point in the history
  16. Unit tests for cli_v4::utils

    1. Added Unit tests for `AuthToken` APIs we are using
    2. Added Unit tests for `BldrUrl` APIs we are using
    3. Added Unit tests for `PkgDownloadOptions`
    
    This covers unit tests for *new* logic we have written during the
    porting activities.
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    d161706 View commit details
    Browse the repository at this point in the history
  17. Added validators for hab pkg command

    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    8af842e View commit details
    Browse the repository at this point in the history
  18. Added proper usage for hab pkg ... commands

    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    ba5a057 View commit details
    Browse the repository at this point in the history
  19. Fixed a trivial unwrap-error bug

    When exporting a package, if the given package does not exist in the
    specified channel (or default channel) we were unwrapping an error,
    rather than properly returning it.
    
    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    ac1f582 View commit details
    Browse the repository at this point in the history
  20. Fixes to issues found during testing - pass 1

    Signed-off-by: Abhijit Gadgil <agadgil@progress.com>
    agadgil-progress committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    bd42815 View commit details
    Browse the repository at this point in the history