Skip to content

Commit 48200ab

Browse files
committed
Centralize version in workspace Cargo.toml and bump to v0.1.1
Version is now defined once in [workspace.package] and inherited by all crates via version.workspace = true. Removed the hardcoded VERSION const from codiv-common config; codivd now uses env!("CARGO_PKG_VERSION") like codiv already does.
1 parent 9e28971 commit 48200ab

8 files changed

Lines changed: 12 additions & 10 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22
members = ["crates/codiv", "crates/codiv-common", "crates/codivd", "crates/codiv-tools"]
33
resolver = "2"
44

5+
[workspace.package]
6+
version = "0.1.1"
7+
58
[patch.crates-io]
69
aisdk = { git = "https://github.com/razorback16/aisdk.git", branch = "main" }

crates/codiv-common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codiv-common"
3-
version = "0.1.0"
3+
version.workspace = true
44
edition = "2021"
55

66
[dependencies]

crates/codiv-common/src/config.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use std::path::PathBuf;
22

3-
pub const VERSION: &str = "0.1.0";
43
pub const FRAME_HEADER_SIZE: usize = 4;
54
pub const MAX_MESSAGE_SIZE: usize = 16 * 1024 * 1024; // 16 MiB
65

crates/codiv-tools/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codiv-tools"
3-
version = "0.1.0"
3+
version.workspace = true
44
edition = "2021"
55

66
[dependencies]

crates/codiv/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codiv"
3-
version = "0.1.0"
3+
version.workspace = true
44
edition = "2021"
55

66
[dependencies]

crates/codivd/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "codivd"
3-
version = "0.1.0"
3+
version.workspace = true
44
edition = "2021"
55

66
[dependencies]

crates/codivd/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn main() {
1313
let args: Vec<String> = std::env::args().collect();
1414

1515
if args.iter().any(|a| a == "--version") {
16-
println!("codivd {}", config::VERSION);
16+
println!("codivd {}", env!("CARGO_PKG_VERSION"));
1717
return;
1818
}
1919

0 commit comments

Comments
 (0)