aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2023-06-01 16:22:10 -0500
committerToby Vincent <tobyv13@gmail.com>2023-06-01 19:03:25 -0500
commit7201e443e19b45a2feb24ef470c6380b0859e52f (patch)
tree6c5fc66926db06faa29101cb8f57793ed9e9ba2c /src/main.rs
parenteaf5c71873705b9593ec0e6b34d7e529d74a9269 (diff)
build: improve build tooling and add CD
Implement a xtask pattern tool for packaging into distributable. Add build script to generate completion scripts and man page. Improve PKGBUILDs and CI to use new tooling and upload artifact to tag after successful CI build. Make minor changes in cli config to facilitate the new build.rs script.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 25a051e..103101b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,6 +1,9 @@
+use std::str::FromStr;
+
use anyhow::Result;
use clap::Parser;
use projectr::{config::Config, project::Projects, tmux::Tmux, Search};
+use tracing::metadata::LevelFilter;
fn main() -> Result<()> {
let config = Config::parse();
@@ -8,7 +11,7 @@ fn main() -> Result<()> {
tracing_subscriber::fmt::fmt()
.pretty()
.with_writer(std::io::stderr)
- .with_max_level(&config.verbosity)
+ .with_max_level(LevelFilter::from_str(&config.verbosity.to_string())?)
.init();
let mut projects = Projects::from(config.parsers);