Skip to content

Commit

Permalink
add build.rs and improved long version
Browse files Browse the repository at this point in the history
  • Loading branch information
soywod committed Nov 29, 2024
1 parent 81847db commit 3520815
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 6 deletions.
57 changes: 56 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ keyring = ["dep:keyring-lib", "email-lib/keyring", "pimalaya-tui/keyring"]
oauth2 = ["email-lib/oauth2", "pimalaya-tui/oauth2", "keyring"]
wizard = ["email-lib/autoconfig", "pimalaya-tui/wizard"]

[build-dependencies]
pimalaya-tui = { version = "=0.1", default-features = false, features = ["build-envs"] }

[dependencies]
async-ctrlc = { version = "1.2", features = ["termination"] }
async-trait = "0.1"
Expand Down
7 changes: 7 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use pimalaya_tui::build::{features_env, git_envs, target_envs};

fn main() {
features_env(include_str!("./Cargo.toml"));
target_envs();
git_envs();
}
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ use std::path::PathBuf;

use clap::{Parser, Subcommand};
use color_eyre::eyre::Result;
use pimalaya_tui::terminal::{cli::arg::path_parser, config::TomlConfig as _};
use pimalaya_tui::{
long_version,
terminal::{cli::arg::path_parser, config::TomlConfig as _},
};

use crate::{
account::command::{
Expand All @@ -14,7 +17,9 @@ use crate::{
};

#[derive(Parser, Debug)]
#[command(name = "mirador", author, version, about)]
#[command(name = env!("CARGO_PKG_NAME"))]
#[command(author, version, about)]
#[command(long_version = long_version!())]
#[command(propagate_version = true, infer_subcommands = true)]
pub struct Cli {
#[command(subcommand)]
Expand Down

0 comments on commit 3520815

Please sign in to comment.