Skip to content

Commit

Permalink
make gitoxide publishable again
Browse files Browse the repository at this point in the history
Apparently build scripts aren't executed when verifying a package, and this
change should get past that.
  • Loading branch information
Byron committed Jun 22, 2023
1 parent ea9f942 commit c16b1df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/plumbing/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ pub fn main() -> Result<()> {
let mut engine = core::corpus::Engine::open_or_create(
db,
core::corpus::engine::State {
gitoxide_version: env!("GITOXIDE_VERSION").into(),
gitoxide_version: option_env!("GITOXIDE_VERSION")
.ok_or_else(|| anyhow::anyhow!("GITOXIDE_VERSION must be set in build-script"))?
.into(),
progress,
trace_to_progress: trace,
reverse_trace_lines,
Expand Down
2 changes: 1 addition & 1 deletion src/plumbing/options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use gitoxide_core as core;
use gix::bstr::BString;

#[derive(Debug, clap::Parser)]
#[clap(name = "gix", about = "The git underworld", version = env!("GITOXIDE_VERSION"))]
#[clap(name = "gix", about = "The git underworld", version = option_env!("GITOXIDE_VERSION"))]
#[clap(subcommand_required = true)]
#[clap(arg_required_else_help = true)]
pub struct Args {
Expand Down
2 changes: 1 addition & 1 deletion src/porcelain/options.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::PathBuf;

#[derive(Debug, clap::Parser)]
#[clap(about = "The rusty git", version = env!("GITOXIDE_VERSION"))]
#[clap(about = "The rusty git", version = option_env!("GITOXIDE_VERSION"))]
#[clap(subcommand_required = true)]
pub struct Args {
/// Do not display verbose messages and progress information
Expand Down

0 comments on commit c16b1df

Please sign in to comment.