Version: 1.0.0
This commit is contained in:
@@ -7,7 +7,9 @@
|
||||
"Bash(cargo clean:*)",
|
||||
"Bash(git describe:*)",
|
||||
"Bash(git add:*)",
|
||||
"Bash(git commit:*)"
|
||||
"Bash(git commit:*)",
|
||||
"Bash(git tag:*)",
|
||||
"Bash(git stash:*)"
|
||||
],
|
||||
"deny": []
|
||||
}
|
||||
|
||||
6
Cargo.lock
generated
6
Cargo.lock
generated
@@ -1001,7 +1001,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kordophone"
|
||||
version = "0.1.0"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"base64",
|
||||
@@ -1027,7 +1027,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kordophone-db"
|
||||
version = "0.1.0"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
@@ -1046,7 +1046,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "kordophoned"
|
||||
version = "0.1.0"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kordophone-db"
|
||||
version = "0.1.0"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kordophone"
|
||||
version = "0.1.0"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "kordophoned"
|
||||
version = "0.1.0"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -20,36 +20,4 @@ fn main() {
|
||||
std::fs::write(out_path, output).expect("Error writing server dbus code");
|
||||
|
||||
println!("cargo:rerun-if-changed={}", KORDOPHONE_XML);
|
||||
|
||||
// Create hybrid version: use Cargo.toml version as base, augment with git info
|
||||
let cargo_version = env!("CARGO_PKG_VERSION");
|
||||
|
||||
let final_version = if let Ok(output) = std::process::Command::new("git")
|
||||
.args(&["describe", "--tags", "--always", "--dirty"])
|
||||
.output()
|
||||
{
|
||||
let git_desc = String::from_utf8_lossy(&output.stdout).trim().to_string();
|
||||
|
||||
// Check if we're on a clean tag that matches the cargo version
|
||||
if git_desc == format!("v{}", cargo_version) || git_desc == cargo_version {
|
||||
// Clean release build - just use cargo version
|
||||
cargo_version.to_string()
|
||||
} else {
|
||||
// Development build - append git info
|
||||
if git_desc.contains("-dirty") {
|
||||
format!("{}-dev-{}", cargo_version, git_desc)
|
||||
} else if git_desc.starts_with("v") && git_desc.contains(&format!("v{}", cargo_version)) {
|
||||
// We're N commits ahead of the tag
|
||||
format!("{}-dev-{}", cargo_version, git_desc.strip_prefix("v").unwrap_or(&git_desc))
|
||||
} else {
|
||||
// Fallback: just append the git description
|
||||
format!("{}-dev-{}", cargo_version, git_desc)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Git not available - just use cargo version
|
||||
cargo_version.to_string()
|
||||
};
|
||||
|
||||
println!("cargo:rustc-env=GIT_VERSION={}", final_version);
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ impl Daemon {
|
||||
let database = Arc::new(Mutex::new(database_impl));
|
||||
|
||||
Ok(Self {
|
||||
version: env!("GIT_VERSION").to_string(),
|
||||
version: env!("CARGO_PKG_VERSION").to_string(),
|
||||
database,
|
||||
event_receiver,
|
||||
event_sender,
|
||||
|
||||
Reference in New Issue
Block a user