Skip to content

Commit

Permalink
dynamic version and add justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ityuany committed Jun 27, 2024
1 parent 7aaa233 commit 9697618
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ members = [

resolver = "2"


[profile.release]
lto = true
strip = "none"
opt-level = "s"
codegen-units = 1
debug = 2

7 changes: 4 additions & 3 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[package]
name = "cli"
version = "0.1.0"
name = "snm"
version = "0.0.1"
edition = "2021"
authors = ["ityuany"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -21,7 +22,7 @@ dialoguer = "0.11.0"
env_logger = "0.11.2"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.0.0", features = ["full"] }
clap = { version = "4.5.1", features = ["derive"] }
clap = { version = "4.5.7", features = ["derive","cargo"] }
ansi_term = "0.12.1"
regex = "1.10.4"
glob = "0.3.1"
Expand Down
12 changes: 6 additions & 6 deletions crates/cli/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use clap::{command, Parser};
use clap::{command, crate_authors, crate_name, crate_version, Parser};
use snm_command::SnmCommands;

pub mod fig;
Expand All @@ -8,11 +8,11 @@ pub mod snm_command;
pub mod execute_cli;

#[derive(Parser, Debug)]
#[clap(
name = "snm",
version = "1.0.0",
author = "Author ityuany <[email protected]>"
)]
#[command(
name = crate_name!(),
author = crate_authors!(),
version = crate_version!(),
about = "snm = ni + fnm + corepack")]
pub struct SnmCli {
#[command(subcommand)]
pub command: SnmCommands,
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use clap::Parser;
use cli::{execute_cli::execute_cli, SnmCli};
use snm::{execute_cli::execute_cli, SnmCli};
use snm_config::parse_snm_config;
use snm_current_dir::current_dir;
use snm_utils::{
Expand Down
13 changes: 13 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

build:
echo "Building the project..."
cargo b

dev:
echo "Running the project..."
cargo watch -x build

test:
echo "Running tests..."
cargo t

0 comments on commit 9697618

Please sign in to comment.