mirror of
https://github.com/ViViDboarder/bitwarden_rs_ldap.git
synced 2024-11-22 11:16:27 +00:00
91d70e6bb8
This adds pre-commit hooks installable using the provided Makefile as well as a new check to validate the version in the Cargo file matches the git tag. This will be useful as a check before pushing releases.
9 lines
290 B
Bash
Executable File
9 lines
290 B
Bash
Executable File
#! /bin/sh
|
|
|
|
CARGO_VERSION=$(cargo pkgid --offline | sed 's/.*#//')
|
|
GIT_VERSION=${GIT_VERSION:-$(git describe --tags --exact-match)}
|
|
if ! [ "v$CARGO_VERSION" = "$GIT_VERSION" ]; then
|
|
echo "ERROR: Cargo version (v$CARGO_VERSION) and git version ($GIT_VERSION) do not match"
|
|
exit 1
|
|
fi
|