upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/git_remote_helper.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-08-01 14:23:53 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-08-01 14:26:43 +0100
commitffbc7843aa5dfe419076b146439ad03ee4f51916 (patch)
treef56cbcec449986dfd855c1ab44e092187b309d73 /src/git_remote_helper.rs
parentfa16f46e341fca66c6c1b01cf28b2c5f2700b15b (diff)
feat(remote): `--version` get from cargo package
instead of manually set. aligns with ngit version.
Diffstat (limited to 'src/git_remote_helper.rs')
-rw-r--r--src/git_remote_helper.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/git_remote_helper.rs b/src/git_remote_helper.rs
index 58c3bf8..4c6b9fc 100644
--- a/src/git_remote_helper.rs
+++ b/src/git_remote_helper.rs
@@ -54,7 +54,9 @@ async fn main() -> Result<()> {
54 bail!("invalid arguments - no url"); 54 bail!("invalid arguments - no url");
55 }; 55 };
56 if env::args().nth(1).as_deref() == Some("--version") { 56 if env::args().nth(1).as_deref() == Some("--version") {
57 println!("v0.0.1"); 57 const VERSION: &str = env!("CARGO_PKG_VERSION");
58 println!("v{VERSION}");
59 return Ok(());
58 } 60 }
59 61
60 let git_repo = Repo::from_path(&PathBuf::from( 62 let git_repo = Repo::from_path(&PathBuf::from(