Skip to content

Commit cd6d91d

Browse files
committed
tlmcmddb-cli: introduce notalawyer to embed license notice into binary
1 parent 5384e3f commit cd6d91d

File tree

5 files changed

+40
-1
lines changed

5 files changed

+40
-1
lines changed

Cargo.lock

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tlmcmddb-cli/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ readme.workspace = true
99

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

12+
[build-dependencies]
13+
notalawyer-build = "0.2"
14+
1215
[dependencies]
1316
anyhow = { version = "1", features = ["backtrace"] }
1417
clap = { version = "4.4.11", features = ["derive"] }
1518
tlmcmddb = "2.5"
1619
tlmcmddb-csv = "2.5"
1720
serde_json = "1"
21+
notalawyer-clap = "0.2"

tlmcmddb-cli/about.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
accepted = [
2+
"MIT",
3+
"Apache-2.0",
4+
"Unicode-DFS-2016",
5+
]

tlmcmddb-cli/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fn main() {
2+
println!("cargo:rerun-if-changed=Cargo.toml");
3+
4+
notalawyer_build::build();
5+
}

tlmcmddb-cli/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use std::{
77

88
use anyhow::{anyhow, Context, Result};
99
use clap::{Parser, Subcommand};
10+
use notalawyer_clap::*;
1011
use tlmcmddb::Database;
1112

1213
#[derive(Parser)]
@@ -135,7 +136,7 @@ impl DatabaseSet {
135136
}
136137

137138
fn main() -> Result<()> {
138-
let cli = Cli::parse();
139+
let cli = Cli::parse_with_license_notice(include_notice!());
139140
match cli.command {
140141
Command::Bundle {
141142
tlm_db_dir,

0 commit comments

Comments
 (0)