Compare commits

..

1 Commits

Author SHA1 Message Date
b2506fd950 detect current version
All checks were successful
continuous-integration/drone/push Build is passing
2020-09-03 14:19:26 +02:00
4 changed files with 3 additions and 26 deletions

2
Cargo.lock generated
View File

@@ -377,7 +377,7 @@ dependencies = [
[[package]]
name = "fido2luks"
version = "0.2.13"
version = "0.2.12"
dependencies = [
"ctap_hmac",
"failure",

View File

@@ -1,6 +1,6 @@
[package]
name = "fido2luks"
version = "0.2.13"
version = "0.2.12"
authors = ["shimunn <shimun@shimun.net>"]
edition = "2018"

View File

@@ -12,15 +12,13 @@ license=('MPL-2.0')
pkgver() {
# Use tag version if possible otherwise concat project version and git ref
git describe --exact-match --tags HEAD 2> /dev/null || \
echo "$(cargo pkgid | cut -d'#' -f2).$(git describe --always)"
echo "$(cargo pkgid | cut -d':' -f3).$(git describe --always)"
}
build() {
cargo build --release --locked --all-features --target-dir=target
./target/release/fido2luks completions bash target
}
package() {
install -Dm 755 target/release/${pkgname} -t "${pkgdir}/usr/bin"
install -Dm 644 target/fido2luks.bash "${pkgdir}/usr/share/bash-completion/completions/fido2luks"
}

View File

@@ -1,7 +1,6 @@
use crate::error::*;
use crate::*;
use structopt::clap::{AppSettings, Shell};
use structopt::StructOpt;
use ctap::{FidoCredential, FidoErrorKind};
@@ -304,14 +303,6 @@ pub enum Command {
#[structopt(name = "connected")]
Connected,
Token(TokenCommand),
/// Generate bash completion scripts
#[structopt(name = "completions", setting = AppSettings::Hidden)]
GenerateCompletions {
/// Shell to generate completions for: bash, fish
#[structopt(possible_values = &["bash", "fish"])]
shell: String,
out_dir: PathBuf,
},
}
///LUKS2 token related operations
@@ -734,17 +725,5 @@ pub fn run_cli() -> Fido2LuksResult<()> {
Ok(())
}
},
Command::GenerateCompletions { shell, out_dir } => {
Args::clap().gen_completions(
env!("CARGO_PKG_NAME"),
match shell.as_ref() {
"bash" => Shell::Bash,
"fish" => Shell::Fish,
_ => unreachable!("structopt shouldn't allow us to reach this point"),
},
&out_dir,
);
Ok(())
}
}
}