Get application version from git
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 6m27s
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 6m27s
This commit is contained in:
@@ -3,6 +3,7 @@ use std::io::Write;
|
||||
use std::iter::once;
|
||||
|
||||
use clap::Parser;
|
||||
use git_version::git_version;
|
||||
use ratatui::layout::Rect;
|
||||
use ratatui::prelude::CrosstermBackend;
|
||||
use ratatui::{Terminal, TerminalOptions, Viewport};
|
||||
@@ -17,7 +18,7 @@ use crate::tunnel::{Registry, Tunnel, TunnelAccess};
|
||||
|
||||
/// Quickly create http tunnels for development
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
#[command(version = git_version!(), about, long_about = None)]
|
||||
pub struct Args {
|
||||
/// Make all tunnels public by default instead of private
|
||||
#[arg(long, group = "access")]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::cmp::{self, max};
|
||||
|
||||
use futures::StreamExt;
|
||||
use git_version::git_version;
|
||||
use ratatui::Frame;
|
||||
use ratatui::layout::{Constraint, Flex, Layout, Position, Rect};
|
||||
use ratatui::style::{Style, Stylize as _};
|
||||
@@ -131,12 +132,7 @@ impl Renderer {
|
||||
}
|
||||
|
||||
pub fn render_title(&self, frame: &mut Frame, rect: Rect) {
|
||||
let title = format!(
|
||||
"{} ({})",
|
||||
std::env!("CARGO_PKG_NAME"),
|
||||
std::env!("CARGO_PKG_VERSION")
|
||||
)
|
||||
.bold();
|
||||
let title = format!("{} ({})", std::env!("CARGO_PKG_NAME"), git_version!()).bold();
|
||||
let title = Line::from(title).centered();
|
||||
frame.render_widget(title, rect);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user