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

Issue 235 #251

Closed
wants to merge 2 commits into from
Closed
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
144 changes: 144 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ repository.workspace = true

default-run = "live777"

build = "build.rs"
[build-dependencies]
shadow-rs = "0.35.1"

[[bin]]
name = "live777"
path = "src/main.rs"
Expand Down Expand Up @@ -87,9 +91,11 @@ net4mqtt = { path = "libs/net4mqtt" }
signal = { path = "libs/signal" }

clap = { workspace = true, features = ["derive"] }
const-str = "0.5.7"
tokio = { workspace = true, features = ["full"] }
tracing = { workspace = true }
serde = { workspace = true }
shadow-rs = "0.35.1"

toml = "0.8.19"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
Expand Down
3 changes: 3 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() -> shadow_rs::SdResult<()> {
shadow_rs::new()
}
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
use clap::Parser;
use const_str::concat;
use shadow_rs::shadow;
use tracing::{debug, info, warn};

shadow!(build);

mod log;
mod utils;

#[derive(Parser)]
#[command(version)]
#[command(version = concat!("v",build::PKG_VERSION,"-",build::SHORT_COMMIT))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need display hash version, usually, concat string and v prefix is unnecessary

struct Args {
/// Set config file path
#[arg(short, long)]
Expand Down
Loading