Skip to content

Commit

Permalink
refer to feature flag instead of env!
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele committed Jun 6, 2023
1 parent 4dff7ad commit 46ba4e4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
./enclave
- uses: actions-rs/cargo@v1
- run: make lint-tools
- run: export SGX_MODE=HW && make lint
- run: make lint

relayer:
runs-on: ubuntu-latest
Expand Down
18 changes: 10 additions & 8 deletions app/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@ use clap::Parser;

/// Entry point for LCP CLI.
#[derive(Debug, Parser)]
#[clap(
#[cfg_attr(feature = "sgx-sw", clap(
name = env!("CARGO_PKG_NAME"),
version = concat!(env!("CARGO_PKG_VERSION"), "-", env!("SGX_MODE")),
version = concat!(env!("CARGO_PKG_VERSION"), "-sw"),
author = env!("CARGO_PKG_AUTHORS"),
about = env!("CARGO_PKG_DESCRIPTION"),
arg_required_else_help = true,
)]
))]
#[cfg_attr(not(feature = "sgx-sw"), clap(
name = env!("CARGO_PKG_NAME"),
version = env!("CARGO_PKG_VERSION"),
author = env!("CARGO_PKG_AUTHORS"),
about = env!("CARGO_PKG_DESCRIPTION"),
arg_required_else_help = true,
))]
pub struct Cli {
#[clap(flatten)]
pub opts: Opts,

/// Subcommand to execute.
///
/// The `command` option will delegate option parsing to the command type,
/// starting at the first free argument.
#[clap(subcommand)]
pub command: CliCmd,
}
Expand Down

0 comments on commit 46ba4e4

Please sign in to comment.