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

Update clap requirement from 3.2.22 to 4.0.11 #511

Merged
merged 2 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ separate changelogs for each crate were used. If you need to refer to these old

## [Unreleased]

### Changed

- libcnb-cargo: Updated to Clap v4. ([#511](https://github.com/heroku/libcnb.rs/pull/511))

## [0.11.1] 2022-09-29

### Fixed
Expand Down
7 changes: 5 additions & 2 deletions libcnb-cargo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ path = "src/main.rs"

[dependencies]
cargo_metadata = "0.15.0"
clap = { version = "3.2.22", default-features = false, features = [
"std",
clap = { version = "4.0.11", default-features = false, features = [
"derive",
"error-context",
"help",
"std",
"usage",
] }
libcnb-package.workspace = true
log = "0.4.17"
Expand Down
12 changes: 6 additions & 6 deletions libcnb-cargo/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use clap::{Parser, Subcommand};

#[derive(Parser)]
#[clap(bin_name = "cargo")]
#[command(bin_name = "cargo")]
pub(crate) enum Cli {
#[clap(subcommand)]
#[command(subcommand)]
Libcnb(LibcnbSubcommand),
}

#[derive(Subcommand)]
#[clap(version, about, long_about = None)]
#[command(version, about, long_about = None)]
pub(crate) enum LibcnbSubcommand {
/// Packages a libcnb.rs Cargo project as a Cloud Native Buildpack
Package(PackageArgs),
Expand All @@ -17,13 +17,13 @@ pub(crate) enum LibcnbSubcommand {
#[derive(Parser)]
pub(crate) struct PackageArgs {
/// Disable cross-compile assistance
#[clap(long)]
#[arg(long)]
pub no_cross_compile_assistance: bool,
/// Build in release mode, with optimizations
#[clap(long)]
#[arg(long)]
pub release: bool,
/// Build for the target triple
#[clap(long, default_value = "x86_64-unknown-linux-musl")]
#[arg(long, default_value = "x86_64-unknown-linux-musl")]
pub target: String,
}

Expand Down