Skip to content

Commit

Permalink
Update clap requirement from 3.2.22 to 4.0.11 (#511)
Browse files Browse the repository at this point in the history
* Update clap requirement from 3.2.22 to 4.0.11

Updates the requirements on [clap](https://github.com/clap-rs/clap) to permit the latest version.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](clap-rs/clap@clap_complete-v4.0.0-rc.1...v4.0.11)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Changes for Clap v4 migration

https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#400---2022-09-28
https://docs.rs/clap/latest/clap/_features/index.html

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ed Morley <[email protected]>
  • Loading branch information
dependabot[bot] and edmorley authored Oct 10, 2022
1 parent 1703857 commit fae8157
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
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

0 comments on commit fae8157

Please sign in to comment.