feat(cli): let a build name its own version
A nightly printed the same 19.0.0 as the release it followed, so a bug report could not say which one it came from. SOULSEEK_RS_VERSION at compile time replaces the crate version in --version, the TUI and the daemon status.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use crate::cli::VERSION;
|
||||
use crate::models::DownloadEntry;
|
||||
use crate::ui::{
|
||||
BYTES_PER_MB, accent_style, dimmed_style, error_style,
|
||||
@@ -14,8 +15,6 @@ use ratatui::{
|
||||
use soulseek_rs::DownloadStatus;
|
||||
use std::fmt::Write as _;
|
||||
|
||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
/// Bytes transferred, bytes expected and combined speed across the downloads
|
||||
/// that are actually running — or `None` when none are, so the caller can hide
|
||||
/// the progress readout entirely.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use super::name_scroll::{column_width, end_offset, scroll_text};
|
||||
use crate::cli::VERSION;
|
||||
use crate::models::FileDisplayData;
|
||||
use crate::ui::{
|
||||
BYTES_PER_MB, HIGHLIGHT_SYMBOL, body_style, dimmed_style, format_bytes,
|
||||
@@ -13,8 +14,6 @@ use ratatui::{
|
||||
};
|
||||
use std::collections::HashSet;
|
||||
|
||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
// The file name and its folder share whatever width the fixed columns leave,
|
||||
// the name getting the larger part: it is what a search is after, and a
|
||||
// folder's tail is a scroll away.
|
||||
|
||||
Reference in New Issue
Block a user