auto detect current version

This commit is contained in:
shimun 2020-09-03 14:56:22 +02:00
parent e1f762ddc9
commit 008e644024
Signed by: shimun
GPG Key ID: E81D8382DC2F971B

View File

@ -9,6 +9,12 @@ pkgdesc="Decrypt your LUKS partition using a FIDO2 compatible authenticator"
url="https://github.com/shimunn/fido2luks"
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)"
}
build() {
cargo build --release --locked --all-features --target-dir=target
./target/release/fido2luks completions bash target