Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
bed8b335
Unverified
Commit
bed8b335
authored
Jun 25, 2025
by
Nathan Barry
Committed by
GitHub
Jun 25, 2025
Browse files
feat: Add --version flag to dynamo-run (#1596)
parent
611722d1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
1 deletion
+59
-1
Cargo.lock
Cargo.lock
+38
-0
launch/dynamo-run/Cargo.toml
launch/dynamo-run/Cargo.toml
+4
-0
launch/dynamo-run/build.rs
launch/dynamo-run/build.rs
+10
-1
launch/dynamo-run/src/main.rs
launch/dynamo-run/src/main.rs
+7
-0
No files found.
Cargo.lock
View file @
bed8b335
...
...
@@ -1683,6 +1683,7 @@ dependencies = [
"tracing",
"tracing-subscriber",
"uuid 1.16.0",
"vergen-gitcl",
]
[[package]]
...
...
@@ -7162,6 +7163,43 @@ dependencies = [
"uuid 0.8.2",
]
[[package]]
name = "vergen"
version = "9.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b2bf58be11fc9414104c6d3a2e464163db5ef74b12296bda593cac37b6e4777"
dependencies = [
"anyhow",
"derive_builder",
"rustversion",
"vergen-lib",
]
[[package]]
name = "vergen-gitcl"
version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9dfc1de6eb2e08a4ddf152f1b179529638bedc0ea95e6d667c014506377aefe"
dependencies = [
"anyhow",
"derive_builder",
"rustversion",
"time",
"vergen",
"vergen-lib",
]
[[package]]
name = "vergen-lib"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b07e6010c0f3e59fcb164e0163834597da68d1f864e2b8ca49f74de01e9c166"
dependencies = [
"anyhow",
"derive_builder",
"rustversion",
]
[[package]]
name = "version-compare"
version = "0.2.0"
...
...
launch/dynamo-run/Cargo.toml
View file @
bed8b335
...
...
@@ -50,3 +50,7 @@ clap = { version = "4.5", features = ["derive", "env"] }
dialoguer
=
{
version
=
"0.11"
,
default-features
=
false
,
features
=
[
"editor"
,
"history"
]
}
futures-util
=
{
version
=
"0.3"
}
regex
=
"1"
[build-dependencies]
vergen-gitcl
=
"1.0"
anyhow
=
{
workspace
=
true
}
launch/dynamo-run/build.rs
View file @
bed8b335
...
...
@@ -15,14 +15,23 @@
use
std
::
env
;
use
std
::
process
::
Command
;
use
vergen_gitcl
::{
Emitter
,
GitclBuilder
};
fn
main
()
{
fn
main
()
->
anyhow
::
Result
<
()
>
{
if
has_cuda_toolkit
()
&&
!
has_feature
(
"cuda"
)
&&
is_cuda_engine
()
{
println!
(
"cargo:warning=CUDA not enabled, re-run with `--features cuda`"
);
}
if
is_mac
()
&&
!
has_feature
(
"metal"
)
{
println!
(
"cargo:warning=Metal not enabled, re-run with `--features metal`"
);
}
let
git_config
=
GitclBuilder
::
default
()
.describe
(
true
,
false
,
None
)
.build
()
?
;
Emitter
::
default
()
.add_instructions
(
&
git_config
)
?
.emit
()
?
;
Ok
(())
}
fn
has_feature
(
s
:
&
str
)
->
bool
{
...
...
launch/dynamo-run/src/main.rs
View file @
bed8b335
...
...
@@ -82,6 +82,13 @@ async fn wrapper(runtime: dynamo_runtime::Runtime) -> anyhow::Result<()> {
println!
(
"{usage}"
);
println!
(
"{HELP}"
);
return
Ok
(());
}
else
if
args
[
0
]
==
"--version"
{
if
let
Some
(
describe
)
=
option_env!
(
"VERGEN_GIT_DESCRIBE"
)
{
println!
(
"dynamo-run {}"
,
describe
);
}
else
{
println!
(
"Version not available (git describe not available)"
);
}
return
Ok
(());
}
for
arg
in
env
::
args
()
.skip
(
1
)
.take
(
2
)
{
let
Some
((
in_out
,
val
))
=
arg
.split_once
(
'='
)
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment