Skip to content

Commit

Permalink
Merge pull request #236 from xrelkd/feat/version
Browse files Browse the repository at this point in the history
Add build-time information
  • Loading branch information
xrelkd authored Dec 31, 2023
2 parents 963385d + de8adee commit 3083c22
Show file tree
Hide file tree
Showing 18 changed files with 276 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Release

on:
push:
branches:
- release/*
tags:
- "v*"

Expand Down
188 changes: 188 additions & 0 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions clipcat-menu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ tokio = { version = "1", features = ["rt-multi-thread", "sync"] }
clap = { version = "4", features = ["derive", "env"] }
clap_complete = "4"
http = "1"
shadow-rs = "0.26"
skim = "0.10"
snafu = "0.8"

Expand All @@ -33,5 +34,8 @@ clipcat-cli = { path = "../crates/cli" }
clipcat-client = { path = "../crates/client" }
clipcat-external-editor = { path = "../crates/external-editor" }

[build-dependencies]
shadow-rs = "0.26"

[lints]
workspace = true
1 change: 1 addition & 0 deletions clipcat-menu/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fn main() -> shadow_rs::SdResult<()> { shadow_rs::new() }
10 changes: 9 additions & 1 deletion clipcat-menu/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ use crate::{
config::Config,
error::{self, Error},
finder::{FinderRunner, FinderType},
shadow,
};

const PREVIEW_LENGTH: usize = 80;

#[derive(Parser)]
#[command(name = clipcat_base::MENU_PROGRAM_NAME, author, version, about, long_about = None)]
#[command(
name = clipcat_base::MENU_PROGRAM_NAME,
author,
version,
long_version = shadow::CLAP_LONG_VERSION,
about,
long_about = None
)]
pub struct Cli {
#[command(subcommand)]
commands: Option<Commands>,
Expand Down
7 changes: 7 additions & 0 deletions clipcat-menu/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ mod cli;
mod config;
mod error;
mod finder;
mod shadow {
#![allow(clippy::needless_raw_string_hashes)]
use shadow_rs::shadow;
shadow!(build);

pub use self::build::*;
}

use self::cli::Cli;

Expand Down
4 changes: 4 additions & 0 deletions clipcat-notify/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ tokio = { version = "1", features = ["rt-multi-thread", "sync"] }
clap = { version = "4", features = ["derive", "env"] }
clap_complete = "4"
mime = "0.3"
shadow-rs = "0.26"
snafu = "0.8"
time = { version = "0.3", features = ["local-offset", "serde"] }

clipcat-base = { path = "../crates/base" }
clipcat-server = { path = "../crates/server" }

[build-dependencies]
shadow-rs = "0.26"

[lints]
workspace = true
Loading

0 comments on commit 3083c22

Please sign in to comment.