summaryrefslogtreecommitdiff
path: root/src/commands/general
diff options
context:
space:
mode:
authorseth <[email protected]>2023-12-15 16:06:59 -0500
committerseth <[email protected]>2023-12-15 16:41:13 -0500
commitb520f45fd3ef855cb0b3ff23603fd5d30aa27296 (patch)
tree102747965571a56bf986d9d40651461584b88cbf /src/commands/general
parente78f09012cef68cbbde8ace7d95d3c5dd5645a67 (diff)
commands: add rust target to version
Diffstat (limited to 'src/commands/general')
-rw-r--r--src/commands/general/version.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/commands/general/version.rs b/src/commands/general/version.rs
index 20368f2..5acd36a 100644
--- a/src/commands/general/version.rs
+++ b/src/commands/general/version.rs
@@ -1,11 +1,13 @@
use crate::colors::Colors;
use crate::Context;
+
use color_eyre::eyre::Result;
/// Get version info
#[poise::command(slash_command)]
pub async fn version(ctx: Context<'_>) -> Result<()> {
let sha = option_env!("GIT_SHA").unwrap_or("main");
+ let target = option_env!("TARGET").unwrap_or("Unknown");
let revision_url = format!(
"[{}]({}/tree/{})",
@@ -20,6 +22,7 @@ pub async fn version(ctx: Context<'_>) -> Result<()> {
option_env!("CARGO_PKG_VERSION").unwrap_or("not found"),
false,
),
+ ("Target:", target, false),
("Revision:", &revision_url, false),
("User Agent:", &crate::api::USER_AGENT, false),
];