Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Build completions to correct directory
Browse files Browse the repository at this point in the history
  • Loading branch information
swsnr committed Nov 28, 2022
1 parent 2efc955 commit cf25a79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ To publish a new release run `scripts/release` from the project directory.

## [Unreleased]

### Fixed
- Include generated shell completions in release artifacts.

## [0.29.0] – 2022-10-21

### Changed
Expand Down
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ fn gen_completions<P: AsRef<Path>>(out_dir: P) -> Result<()> {
use clap_complete::*;

let completions = out_dir.as_ref().join("completions");
std::fs::create_dir_all(completions).expect("Failed to create $OUT_DIR/completions");
std::fs::create_dir_all(&completions).expect("Failed to create $OUT_DIR/completions");

for shell in [Shell::Bash, Shell::Zsh, Shell::Fish, Shell::PowerShell] {
generate_to(
shell,
&mut mdcat::Args::command(),
"mdcat",
out_dir.as_ref().as_os_str(),
&completions
)?;
}

Expand Down

0 comments on commit cf25a79

Please sign in to comment.