4LFON6GEZVZPITBA7AZCNARXHUSRHWGFYQMR2X6JEVBGHKHECVTAC - name: Upload shell completionsif: matrix.os == 'ubuntu'uses: actions/upload-artifact@v1with:name: convco-shell-completionspath: target/completions- name: Debian packageif: matrix.os == 'ubuntu'run: |cargo install cargo-debcargo deb- name: Upload Debian packageif: matrix.os == 'ubuntu'uses: actions/upload-artifact@v1with:name: convco-debpath: target/debian
[build-dependencies]structopt = "0.3.4"[package.metadata.deb]depends = ""extended-description = """\Conventional commit tools. \Create a changelog. \Check if commits follow the convention. \Calculate the next version based on the conventional commits."""assets = [# bin["target/release/convco", "/usr/local/bin/", "755"],# completions["target/completions/convco.bash", "/usr/share/bash-completion/completions/", "644"],["target/completions/_convco", "/usr/share/zsh/vendor-completions/", "644"],["target/completions/convco.fish", "/usr/share/fish/completions/", "644"],]
use std::{fs, iter::FromIterator};use structopt::clap::Shell;include!("src/cli.rs");fn main() {let mut app = Opt::clap();let out_dir = &["target", "completions"];let out_dir: PathBuf = PathBuf::from_iter(out_dir.iter());let out_dir = out_dir.as_path();fs::create_dir_all(out_dir).unwrap();// Generate completions for all shells available in `clap`.app.gen_completions("convco", Shell::Bash, out_dir);app.gen_completions("convco", Shell::Fish, out_dir);app.gen_completions("convco", Shell::Zsh, out_dir);app.gen_completions("convco", Shell::Elvish, out_dir);app.gen_completions("convco", Shell::PowerShell, out_dir);}