diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit new file mode 100755 index 0000000..a5d91dc --- /dev/null +++ b/git-hooks/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +echo -n "$(git branch --show-current)" > ./mach_nix/VERSION +git add ./mach_nix/VERSION diff --git a/shell.nix b/shell.nix index 075107b..42a69f9 100644 --- a/shell.nix +++ b/shell.nix @@ -14,5 +14,6 @@ mkShell { ]; shellHook = '' export PYTHONPATH=$(pwd)/ + git config core.hooksPath ./git-hooks ''; }